react-native-app-auth: Failed to fetch configuration

Hi! I’m trying to make uber oauth2 work but I keep getting this error (currently testing on android).

Error: Failed to fetch configuration
    at createErrorFromErrorData (NativeModules.js:123)
    at NativeModules.js:80
    at MessageQueue.__invokeCallback (MessageQueue.js:346)
    at MessageQueue.js:132
    at MessageQueue.__guard (MessageQueue.js:262)
    at MessageQueue.invokeCallbackAndReturnFlushedQueue (MessageQueue.js:131)
    at debuggerWorker.js:72

From what I’ve seen in issues, this is a problem with ‘issuer’ variable. Seems like I can’t understand what string I should use there.

Here is my code

    const scopes = ["request"];
    const appAuth = new AppAuth({
      issuer: "https://login.uber.com/oauth/v2/authorize",
      clientId: settings.UberClientId,
      redirectUrl: "myApp:/oauth"
    })

    appAuth.authorize(scopes).then((response)=>{
      console.log('response=>', response)
    }).catch((reject)=>{
      console.log('reject=>', reject)
    });

Here is the screenshot of uber endpoints image

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 24 (11 by maintainers)

Most upvoted comments

What happens when you specify the configuration manually?

{
  clientId: 'native.code',
  redirectUrl: 'io.identityserver.demo:/oauthredirect',
  additionalParameters: {},
  scopes: ['openid', 'profile', 'email', 'offline_access'],
  serviceConfiguration: {
    authorizationEndpoint: 'https://demo.identityserver.io/connect/authorize',
    tokenEndpoint: 'https://demo.identityserver.io/connect/token',
    revocationEndpoint: 'https://demo.identityserver.io/connect/revoke'
  }
}