Managing users state in NextJS and Zustand when authenticating via external API
Unanswered
Ragdoll posted this in #help-forum
RagdollOP
I am working on a new project with NextJS and Zustand.
I know that Next Auth exists but I don’t want to user it because I don’t want to rely on other party services or email log ons.
Can somebody guide my in the right direction I con achieve an auth. system based on NestJS and JWT authentication?
We want to save the users information locally on our database (hashed password, uid, email address and so on) and afaik that’s not possible with Next/Auth
I know that Next Auth exists but I don’t want to user it because I don’t want to rely on other party services or email log ons.
Can somebody guide my in the right direction I con achieve an auth. system based on NestJS and JWT authentication?
We want to save the users information locally on our database (hashed password, uid, email address and so on) and afaik that’s not possible with Next/Auth
1 Reply
@Ragdoll I am working on a new project with NextJS and Zustand.
I know that Next Auth exists but I don’t want to user it because I don’t want to rely on other party services or email log ons.
Can somebody guide my in the right direction I con achieve an auth. system based on NestJS and JWT authentication?
We want to save the users information locally on our database (hashed password, uid, email address and so on) and afaik that’s not possible with Next/Auth
that is possible with Next Auth but if you want to proceed with custom auth then you can ask backend to send JWT token and some basic details of the user. Set the token in cookies and the details in zustand state and share it among pages