Hello.
I’m currently in the process of migrating from the auth0-js SDK to auth0/auth0-react SDK.
I’ve wrapped my app
in an Auth0Provider component with the following props:
domain={'...'}
audience={'https://...'}
clientId={'...'}
redirectUri={window.location.origin}
scope={'openid email profile <scopes...>'}
useRefreshTokens={true}
When i call
token = await getAccessTokenSilently({
audience: 'https://...,
scope: '<...>'
});
I get the following error message in the developer tools:
Silent callback error: error=unauthorized_client&error_description=Grant type ‘authorization_code’ not allowed for the client.
The auth0-js settings before the migration to react SDK were:
// ***PREVIOUS SETTINGS***
const auth0Client = new auth0.WebAuth({
domain: '...',
audience: 'h...',
clientID: '...',
redirectUri: window.location.origin,
responseType: 'token id_token',
scope: 'openid email profile <...>'
});
Since I can’t pass to Auth0Provider component the responseType property like i previously did, how can I set the grant type to token id_token
?