• Daniel González J.
  • NEWBIE
  • 20 Points
  • Member since 2018
  • Front End Developer

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies

We are developing a React Native App with Expo using Auth2 User Agent Flow (https://help.salesforce.com/articleView?id=remoteaccess_oauth_user_agent_flow.htm&type=0)

I have checked all different post about this topic but I still cannot receive it.

  1. Managed App > Scope > Perform requests on your behalf at any time (refresh_token, offline_access) enabled
  2. Managed App > Scope > Full Access (full) enabled

This is what we send 

https://login.salesforce.com/services/oauth2/authorize
?response_type=token
&client_id=OurCustomerKeyFromTheOrg
&redirect_uri=https%3A%2F%2Fauth.expo.io%2F%40robertovg_pve%2FprecursiveMobile

We receive all data (access_token, instance_url,..) but no refresh_token.

Reading official doc, we have added scope=refresh_token / scope=full%20refresh_token  but the response we have is that "refresh_token" is not a valid scope.

Also, we changed redirectUrl as https://login.salesforce.com/services/oauth2/success but then, how can we redirect back to the app? Putting this url, it gets stuck on the browser after putting credentials

What we missed? What else we can try? Thanks in advance.

We are developing a React Native App with Expo using Auth2 User Agent Flow (https://help.salesforce.com/articleView?id=remoteaccess_oauth_user_agent_flow.htm&type=0)

I have checked all different post about this topic but I still cannot receive it.

  1. Managed App > Scope > Perform requests on your behalf at any time (refresh_token, offline_access) enabled
  2. Managed App > Scope > Full Access (full) enabled

This is what we send 

https://login.salesforce.com/services/oauth2/authorize
?response_type=token
&client_id=OurCustomerKeyFromTheOrg
&redirect_uri=https%3A%2F%2Fauth.expo.io%2F%40robertovg_pve%2FprecursiveMobile

We receive all data (access_token, instance_url,..) but no refresh_token.

Reading official doc, we have added scope=refresh_token / scope=full%20refresh_token  but the response we have is that "refresh_token" is not a valid scope.

Also, we changed redirectUrl as https://login.salesforce.com/services/oauth2/success but then, how can we redirect back to the app? Putting this url, it gets stuck on the browser after putting credentials

What we missed? What else we can try? Thanks in advance.