Replies: 1 comment
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
All,
I am writing a page of my app that adjusts the user's profile, i.e., first, middle and last name, and email. Long before we get there, I am using the session callback to store whatever user object is returned in the session object, so I can access with getSession() (love that by the way!) as below in [...nextauth].ts:
async session({ session, token, user }) { session.accessToken = token.accessToken; session.user = token.user; return session; },
My question is this: when I adjust the user's info (i.e., change their first name), can I adjust the session object to reflect that? I have tried the below to no avail:
updateUser(newUser).then((newUser) => { session.user = newUser; });
Beta Was this translation helpful? Give feedback.
All reactions