Next.js Discord

Discord Forum

Create Session on Credentials registration

Ragdoll posted this in #help-forum
Open in Discord
I am using next-auth.
For now I havent found any direct way to create session directly after registering the user manually.
So is it a good practice to redirect the user to /login after registering in /signup and save the info in database?
After login next-auth creates and save credentials
I can create credentials in register route itself using passportjs but I don't want to take the hard way

api/register/route.ts -
authOptions -
AuthPage -

0 Replies