Create Session on Credentials registration
Unanswered
Ragdoll posted this in #help-forum
![Avatar](https://cdn.discordapp.com/embed/avatars/0.png)
RagdollOP
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 - https://pastecord.com/ecotezezyz.js
authOptions - https://pastecord.com/iwipevugid.typescript
AuthPage - https://pastecord.com/ogixysexuw.js
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 - https://pastecord.com/ecotezezyz.js
authOptions - https://pastecord.com/iwipevugid.typescript
AuthPage - https://pastecord.com/ogixysexuw.js