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
Hi, first off thank you for maintaining this library. Its made it super easy to get up and running with auth in next.
I'm working on an app and setting a username is very important. I'd like to keep the username available in the jwt. The auth workflow is as follows: user provides email (using email provider), use the newUser redirect page to send the user to finish providing user registration info (namely the username), and upon registration completion redirect to the callback url (feature in canary).
An issue arises because the jwt is set when the email is verified, but the info on the jwt becomes stale immediately after the user finishes their registration on the newUser page (the session jwt has no name set, but the db has a saved name).
Is there a recommended way to force refresh a jwt? Alternatively, is there a better flow for assigning a username using the email provider?
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
-
Hi, first off thank you for maintaining this library. Its made it super easy to get up and running with auth in next.
I'm working on an app and setting a username is very important. I'd like to keep the username available in the jwt. The auth workflow is as follows: user provides email (using email provider), use the
newUser
redirect page to send the user to finish providing user registration info (namely the username), and upon registration completion redirect to the callback url (feature in canary).An issue arises because the jwt is set when the email is verified, but the info on the jwt becomes stale immediately after the user finishes their registration on the newUser page (the session jwt has no name set, but the db has a saved name).
Is there a recommended way to force refresh a jwt? Alternatively, is there a better flow for assigning a username using the email provider?
Beta Was this translation helpful? Give feedback.
All reactions