Get updated User object after updating email (Next.js)

I’m using the Management API to update a user’s email.

Once I update the user’s email, the user object from useUser() doesn’t update to the new email, even after refreshing the page.

I have to logout and login to get the updated user object.

I suspect it has to do with the user object from useUser() not keeping track of live updates, so the user object will forever be the same until the sessions end and begins again.

Is there a way to refresh the user object without logging out and logging back in?

Hi @solarpathic

Welcome to the Auth0 Community!

Thank you for posting your question. This is an expected behavior and the auth0 session is terminated while changing the value of email , email_verified , phone_number , and password.

Thanks
Dawid

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.