# Get tokens for native app and its backing API with a single auth flow using react-native-auth0

**URL:** <https://community.auth0.com/t/get-tokens-for-native-app-and-its-backing-api-with-a-single-auth-flow-using-react-native-auth0/66172>\
**Category:** Get Help\
**Tags:** react-native-auth0, react-native, jwt, api, native\
**Created:** [July 14, 2021, 5:28pm UTC](https://community.auth0.com/t/get-tokens-for-native-app-and-its-backing-api-with-a-single-auth-flow-using-react-native-auth0/66172 "2021-07-14T17:28:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mhorton](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/mhorton/32/25064_2.png) [@mhorton](https://community.auth0.com/u/mhorton)\
**Post date:** [July 14, 2021, 5:28pm UTC](https://community.auth0.com/t/get-tokens-for-native-app-and-its-backing-api-with-a-single-auth-flow-using-react-native-auth0/66172/1 "2021-07-14T17:28:16Z")

</div>

I have 2 Auth0 applications (1 API and 1 native app). The native app is built using react-native and react-native-auth0. The API supports our services and is the backing API for this native app.

I want to authenticate a user to the native app (something I have accomplished already), but I also want to get an accessToken for the backing API without making a 2nd call to react-native-auth0’s `webAuth.authorize()`.

I have been able to call `webAuth.authorize()` using an audience/scope combo that gets me accessToken, idToken, and refreshToken for the native app, but that accessToken is not useful for my backing API. I also have an audience/scope combo that gets me an accessToken that **is** meant for the backing API as well as an idToken, but I can’t get a refreshToken.

Can anyone help untangle this for me? I just want users to log in once and have their app pull their user data and get access to our API.

Please include the following information in your post:

- **Which SDK this is regarding:** react-native-auth0
- **SDK Version:** 2.9.0
- **Platform Version:** React Native 0.64.2

---

<div class="post-metadata">

**Author:** ![mhorton](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/mhorton/32/25064_2.png) [@mhorton](https://community.auth0.com/u/mhorton)\
**Post date:** [July 14, 2021, 7:00pm UTC](https://community.auth0.com/t/get-tokens-for-native-app-and-its-backing-api-with-a-single-auth-flow-using-react-native-auth0/66172/2 "2021-07-14T19:00:32Z")

</div>

For anyone that reads this, the reason using the API audience with the `offline_access` scope didn’t work was that Offline Access was turned off on that API. I flipped the Offline Access switch in settings and that did the trick.

I know have all the tokens and user info I need.

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [July 15, 2021, 12:51pm UTC](https://community.auth0.com/t/get-tokens-for-native-app-and-its-backing-api-with-a-single-auth-flow-using-react-native-auth0/66172/3 "2021-07-15T12:51:24Z")

</div>

Perfect! Thanks for sharing it with the rest of community!

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [July 29, 2021, 10:21am UTC](https://community.auth0.com/t/get-tokens-for-native-app-and-its-backing-api-with-a-single-auth-flow-using-react-native-auth0/66172/4 "2021-07-29T10:21:18Z")

</div>


