React Native - Invalid signature on access token

Overview

I am using "React Native" for mobile applications. i am fallowing below link to integrate auth0 in my mobile application.
ref: https://auth0.com/docs/quickstart/native/react-native/00-login
After login success i am getting user info. i am trying to get access token from auth0 using i create application in auth0. in web it's working fine but in mobile i am getting issue Invalid signature.
I am passing audience too in auth provider. in mobile i am using getCredentials() to get access and id-Token.

Cause

This is caused by a lack of parameters passed in the authorize() call, resulting in an opaque token only meant for Auth0 server consumption.

Solution

This can occur when the authorize request is missing parameters, and thus it is defaulting to a token just for the Auth0 /userinfo endpoint, which is an opaque token only readable by Auth0's servers. The Auth0Provider only accepts domain and client ID, additional parameters will be ignored:  So the rest of the configuration needs to be provided in the authorize() call: E.g.:
await authorize({scope: 'openid profile email',audience: '<your desired API identifier here>'});



 

Recommended content

No recommended content found...