Allowing users to change their email address & password on a Frontend profile screen

Hi,

I have built a profile screen on my React SPA front end that allows users to change their email address and password.

The React SPA uses the Auth0 react library.

When a user hits save on the profile screen, it calls a custom built .NET Core API which in turn calls the Auth0 Management API to execute the user changes.

The Update User Management API call appears to go through successfully however it immediately logs the user out on the React web app frontend. Is this by design and how can I avoid the user being logged out?

Many thanks in advance,

Truc.