GithubHelp home page GithubHelp logo

Comments (7)

ymc9 avatar ymc9 commented on June 10, 2024

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.

Eliav2 avatar Eliav2 commented on June 10, 2024

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.

ymc9 avatar ymc9 commented on June 10, 2024

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.

Eliav2 avatar Eliav2 commented on June 10, 2024

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.

ymc9 avatar ymc9 commented on June 10, 2024

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.

Eliav2 avatar Eliav2 commented on June 10, 2024

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.

Eliav2 avatar Eliav2 commented on June 10, 2024

I'm closing this issue as you linked my repo at the docs @ymc9

Thanks

from zenstack.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.