Comments (7)
I think this project is amazing. And the docs? We'll, beyond amazing! I really enjoyed reading the entire docs including your blogs, I learned a lot even as a senior Full-Stack developer.
You focus a lot on authorization, but not much on authentication. I would very much enjoy to read similar blog demonstrating implementing authentication using zenstack and backend framework such express or fastify, while explaining how to manage tokens and sessions with zenstack(with OAuth2 or email-password). And that's it, then your site would be really complete.
Hi @Eliav2 , thank you for the love for the project and blog. Your feedback is very encouraging, and we'll strive to continue creating value for the community!
Yes, lots of the content is focused on authorization. It's mainly because ZenStack is authentication-agnostic and it offers a simple and generic way to interface with any authentication system. However, I agree with you that for developers who seek content to help them build full-stack web apps they'll need both AuthN and AuthZ. I'll think about how to better cover both sides in future content. Thank you!
from zenstack.
Hey @ymc9
The main struggle for me was that most of the examples using Authjs using next, while our requirement was decoupled frontend and backend. This means fastify or express for the backend, and Authjs does not support express or fastify in stable way yet(I tried. Too many bugs). And there is no example for express authentication with SSO
However I was able to get it right in the end. Using express+passport with sso for github on the backend and react on the frontend.
I would like to offer this template as additional example. it is not public app, but I can extract the relevant part as an starter template "zenstack--express-passport-sso--react"
from zenstack.
Hey @ymc9 The main struggle for me was that most of the examples using Authjs using next, while our requirement was decoupled frontend and backend. This means fastify or express for the backend, and Authjs does not support express or fastify in stable way yet(I tried. Too many bugs). And there is no example for express authentication with SSO
However I was able to get it right in the end. Using express+passport with sso for github on the backend and react on the frontend. I would like to offer this template as additional example. it is not public app, but I can extract the relevant part as an starter template "zenstack--express-passport-sso--react"
Hi @Eliav2 , yes, such a sample will be very helpful! I believe many people use ZenStack in projects with decoupled frontend and backend. If you have it, I'd love to link to it in the README and doc site. Thank you!
from zenstack.
hey @ymc9
i've created good template for decoupled frontend and backend monorepo.
backend: zenstack+express+sso github auth
frontend: react+tanstack-query+tanstack-rotuer+mui5 on vite devserver
also smart mapping are done on vite.config.ts and tsconfig.json files to flawless importing behavior on the client side.
This template is made from actual project that was stripped down to include only the common use cases when starting new project.
here https://github.com/Eliav2/zenstack-warehouse-demo
this template can be awesome starting point for people looking for using zenstack with express backend with sso authentication
from zenstack.
hey @ymc9 i've created good template for decoupled frontend and backend monorepo.
backend: zenstack+express+sso github auth frontend: react+tanstack-query+tanstack-rotuer+mui5 on vite devserver
also smart mapping are done on vite.config.ts and tsconfig.json files to flawless importing behavior on the client side. This template is made from actual project that was stripped down to include only the common use cases when starting new project.
here https://github.com/Eliav2/zenstack-warehouse-demo
this template can be awesome starting point for people looking for using zenstack with express backend with sso authentication
Thanks for working on this, @Eliav2 ! It looks pretty nice. I'll link to it in the docs. It'll be very helpful for folks who want a similar architecture.
Quick question: I see there are two zmodel schemas in the backend project. The dev one is not needed, right?
from zenstack.
absolutely right. just removed itπ. i just re-checked and removed anything that was unnecessary for the template, if you see anything unnecessary let me know
from zenstack.
I'm closing this issue as you linked my repo at the docs @ymc9
Thanks
from zenstack.
Related Issues (20)
- [BUG] Query Discrepancy with Selected Relation Fields HOT 2
- [Language Server] No autocompletion is provided when accessing `auth().`
- input error when querying compound key entry HOT 2
- [BUG] Types generated when using `@default(auth().id)` are not compatible with third party libraryes HOT 2
- [Feature Request] TRPC plugin should generate router procedure for permission checker
- Error - Maximum call stack size exceeded HOT 6
- Policy filtering should respect field-level access policies HOT 1
- [Feature Request] Reuse primitive types with validation rules
- [Feature Request] Compatibility with Prisma 5.14 `createManyAndReturn` HOT 3
- [Feature Request] Hono Support HOT 1
- [Feature Request] Supporting comparing fields of different models in policy rules HOT 1
- [Feature Request] Allow Disabling of Version Check HOT 1
- Prisma schema validation error - Relation map argument is too long HOT 1
- _count on inherited model not working HOT 2
- [Feature Request] Querying genererated API with fetch HOT 2
- [Feature Request] Stop certain access control rules not to be applied while connecting/disconnecting relationship HOT 1
- [TanStack Query] UseInfinite hooks should make the `initialPageParam` option field optional and use the args argument to fill it HOT 1
- [Feature Request] Access control for Prisma Pulse
- Polymorphic model with inherited relation error HOT 2
- Futures do not work with date fields HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zenstack.