React-native-auth0 getTokenSilently

Hi team,

Trying to work out a simply use case without success:
1, User login with react native app.
2, Get a token for an api where the user already have a role with permission to access.

(1) works fine.
However, react-native-auth0 seem not having a simply way to achieve (2), where similar function of getTokenSilently is not available.

What’s the suggested way of achieving (2) in react native ?

the solution from this post did Not work for me.

The access_token returned would thrown an “invalid audience” if used towards the api.

Thanks a lot

Please include the following information in your post:

  • Which SDK this is regarding: e.g. auth0-node
    react-native-auth0

  • SDK Version: e.g. 2.29.0
    2.9.0

  • Platform Version: e.g. Node 12.19.0
    React native 0.63.4

  • Code Snippets/Error Messages/Supporting Details/Screenshots:

Is this a feature request or bug report? If so, please create an issue directly in the corresponding GitHub repo. The Community SDK category is for general discussion and support.

I had figured out a solution.
The trick is to take out “openid profile email” from the scope.
Just a scope for the target api, offline_access would do.

1 Like

Thanks for sharing it with the rest of community!