Skip to content
This repository has been archived by the owner on Feb 21, 2020. It is now read-only.

Callback URL help #21

Closed
MeKyleH opened this issue Jul 5, 2018 · 1 comment
Closed

Callback URL help #21

MeKyleH opened this issue Jul 5, 2018 · 1 comment

Comments

@MeKyleH
Copy link

MeKyleH commented Jul 5, 2018

I'm testing this out with Twitter. When I use the _loginWithAuth0() method I get navigated correctly to the Auth0 with the Twitter option and the email/password option. However, when I select Twitter I get an error in my simulator stating:

Callback URL not approved for this client application. Approved callback URLs can be adjusted in your application settings.

and the logs show:

Object {
  "errorCode": undefined,
  "params": Object {
    "error": "access_denied",
    "error_description": "Callback URL not approved for this client application. Approved callback URLs can be adjusted in your application settings",
    "exp://localhost:19000/--/expo-auth-session": "",
  },
  "type": "success",
  "url": "exp://localhost:19000/--/expo-auth-session#error=access_denied&error_description=Callback%20URL%20not%20approved%20for%20this%20client%20application.%20Approved%20callback%20URLs%20can%20be%20adjusted%20in%20your%20application%20settings",
}

However, if I use the _loginWithAuth0Twitter() method I simply get the same error above, nothing opens in the webview. I've tried setting up my Auth0 application callback URLS as such:

https://auth.expo.io/@USERNAME/SLUG,
https://auth.expo.io/@USERNAME/SLUG/callback,
expo://APPLICATION.auth0.com/ios/SLUG/callback,
exp://localhost:19000/--/expo-auth-session,
exp://localhost:19000/--/expo-auth-session/callback

and my Twitter App callback URLs are set as:

https://auth.expo.io/@USERNAME/SLUG,
https://APPLICATION.auth0.com

Can someone take a look at their callback URLs and give me a suggestion please. Thanks!

@MeKyleH
Copy link
Author

MeKyleH commented Jul 11, 2018

I figured out the issue. In the Twitter Developer console for the callback Url I was using:

https://PROJECTID.auth0.com/callback

and it should have been:

https://PROJECTID.auth0.com/login/callback

As the second callback Url I have added:

exp://

And it works like a charm. Hopefully, this helps someone in the future.

@MeKyleH MeKyleH closed this as completed Jul 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant