# Using react-native-auth0, authorize is successful but returned result is undefined

**URL:** <https://community.auth0.com/t/using-react-native-auth0-authorize-is-successful-but-returned-result-is-undefined/184213>\
**Category:** Get Help\
**Tags:** free-trial, login-experience\
**Created:** [March 20, 2025, 4:27pm UTC](https://community.auth0.com/t/using-react-native-auth0-authorize-is-successful-but-returned-result-is-undefined/184213 "2025-03-20T16:27:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![liuqiaowei512](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/liuqiaowei512/32/73784_2.png) [@liuqiaowei512](https://community.auth0.com/u/liuqiaowei512)\
**Post date:** [March 20, 2025, 4:27pm UTC](https://community.auth0.com/t/using-react-native-auth0-authorize-is-successful-but-returned-result-is-undefined/184213/1 "2025-03-20T16:27:23Z")

</div>

I’m using the react-native-auth0 sdk to setup auth flow. Following the doc I did

```auto
try {
      let authResult = await authorize({ scope: "openid profile email" });
      console.debug("User authorized", authResult);
      let credentials = await getCredentials();
      console.debug("User access token", credentials);
    } catch (error) {
      console.error("Failed to sign in user", error);
    }

```

The authorize call is success, however the result and the credentials returned are always undefined.  
I did my search here and also made sure the bundle identifier and callback URLs are added to my auth0 dashboard. Still undefined is returned(no error was thrown)  
expo: ~52.0.38  
react: 18.3.1  
react-native: 0.76.7  
react-native-auth0: ^4.4.0

I’m using iOS simulator

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [March 20, 2025, 10:20pm UTC](https://community.auth0.com/t/using-react-native-auth0-authorize-is-successful-but-returned-result-is-undefined/184213/3 "2025-03-20T22:20:37Z")

</div>

Hi @liuqiaowei512,

Welcome to the Auth0 Community!

It seems like another community member shared a reply that might help you with your issue: [Trouble with authorizing my own backend api invalid token error - #5 by marcstedman](https://community.auth0.com/t/trouble-with-authorizing-my-own-backend-api-invalid-token-error/136409/5)

It mentions passing the `audience` parameter to the authorized request to get a valid JWT access token to get the credentials.

Could you try that and let me know if you continue having issues?

Thanks,  
Rueben

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [April 3, 2025, 10:21pm UTC](https://community.auth0.com/t/using-react-native-auth0-authorize-is-successful-but-returned-result-is-undefined/184213/4 "2025-04-03T22:21:24Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
