How to ask for consent when the API permissions change?

My API permissions were initially defined as:

  • “use:api1”

In my React App, when I authenticate my users and handle sign ups, I’ve got the following.

              redirect_uri: window.location.origin,
              audience: process.env.AUTH0_AUDIENCE!,
              scope: 'profile email use:api1'

and this works well. Now when I am expanding my permission set, the scope shall be: profile email use:api1 use:api2. Naturally, every user will now see “Consent required” error, and that’s ok.

Following up on this post: what is not clear is how to request or synchronise the new permissions without deleting the user (obviously). You refer to this page where is a raw request example provided, but I want to know what is the best practice to achieve this window in the React App using Auth0Provider.

When I log out my user, I would expect that auth0 should pick up the change in the required scope automatically (basing on Auth0Provider props) and request new permissions (consent) upon the next sign-in attempt but it does not happen. Struggle to understand why.

Could you please help with the solution?