how to update session for changing email #5346
Unanswered
Atsuyoshi-Funahashi
asked this question in
Help
Replies: 1 comment
-
@Atsuyoshi-Funahashi Did you get anywhere with this? :) |
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.
-
Hello, I have already created a login function in my project using NextAuth!
The minimal information of the user (email,image,name) is stored in the NextAuth session. Apart from that, all information about the user is stored in a DB. (NextAuth and DB are not linked).
Currently, I am creating a process to change the email address. When a user changes his/her email address, a confirmation email is sent to the new email address via sendgrid, and when the user steps on the link in the email, the email address change is completed and the DB is updated.
However, the session information in NextAuth is not updated and
session.user.email
is still the original email address. I would like to updatesession.user.email
, so I would like to know how to do this.Beta Was this translation helpful? Give feedback.
All reactions