You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm building a system that uses the credentials provider that needs to enable users to create accounts and authenticate with email/password. When a user account is created in a next api endpoint, I need to create a session for that user to log them in.
Currently, there is no (easy) way to do this with next-auth. The solution I'm currently looking at is recreating the session store and manually adding a session cookie to the response of this endpoint using the same set of session cookie tooling that next-auth uses. It would be great if next-auth provided an easy server-side way to create a session by passing in a user object.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm building a system that uses the credentials provider that needs to enable users to create accounts and authenticate with email/password. When a user account is created in a next api endpoint, I need to create a session for that user to log them in.
Currently, there is no (easy) way to do this with next-auth. The solution I'm currently looking at is recreating the session store and manually adding a session cookie to the response of this endpoint using the same set of session cookie tooling that next-auth uses. It would be great if next-auth provided an easy server-side way to create a session by passing in a user object.
Beta Was this translation helpful? Give feedback.
All reactions