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 have a hook in signIn that posts to my API server (I'm synchronizing AuthJS state with an API server's state):
async signIn({ user, account, profile }) {
// POST user.id to API server
However, what I've noticed is that the user ID provided in signIn is oftentimes different from the user id provided in the browser session through this callback:
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 have a hook in
signIn
that posts to my API server (I'm synchronizing AuthJS state with an API server's state):However, what I've noticed is that the user ID provided in
signIn
is oftentimes different from the user id provided in the browser session through this callback:How can I get a consistent user id on sign-in?
Beta Was this translation helpful? Give feedback.
All reactions