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
Hey all, for a project I've set up a working next-auth flow with a credentials provider and JWT. I can sign in/sign out, get my user from my session, all of that is working fine.
The flow for new users is currently:
register with email/password
api sends a verification email with link to a frontend endpoint, which verifies the users
redirect to custom login page on success where next-auth signin gets called.
We are now looking if we can simplify this flow by skipping the redirect to the login page. The api can log the user in on successful verification and return a token and user object (same as on login), but how can we get this in the session?
We can't call signin as we don't know the password of the user at that point. Is there any other entry at that point that we could use to set the session?
questionAsk how to do something or how something works
1 participant
Converted from issue
This discussion was converted from issue #3269 on November 24, 2021 16:17.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
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
Uh oh!
There was an error while loading. Please reload this page.
-
Question 💬
Hey all, for a project I've set up a working next-auth flow with a credentials provider and JWT. I can sign in/sign out, get my user from my session, all of that is working fine.
The flow for new users is currently:
We are now looking if we can simplify this flow by skipping the redirect to the login page. The api can log the user in on successful verification and return a token and user object (same as on login), but how can we get this in the session?
We can't call signin as we don't know the password of the user at that point. Is there any other entry at that point that we could use to set the session?
Thanks in advance!
How to reproduce ☕️
Not really reproduce-able I think
Contributing 🙌🏽
No, I am afraid I cannot help regarding this
Beta Was this translation helpful? Give feedback.
All reactions