How to update session after changing a user's role

Thanks for the response @tyf!

I checked this page before, but it was unclear to me where/how should I use the silent authentication step.

Should I do something like this inside my endpoints?

export default withApiAuthRequired(async function myApiRoute(req, res) {

    await handleLogin(req, res, {
      authorizationParams: {
        prompt: 'none',
        audience: "mysite.com"
      },
    });

}

Using this redirects me immediately.
Is there a way of “re-authorizing” the user and continue on the same page?

Thanks :slight_smile:

1 Like