react-native-oauth icon indicating copy to clipboard operation
react-native-oauth copied to clipboard

Safari cannot open the page because address is invalid

Open ghost opened this issue 8 years ago • 1 comments

Hi,

I can't get rid of this error :( I do not know what I do bad... Let me show you my config:

In the XCode, I have:

  • URL Type:
    • Identifier: com.test.ios - URL Scheme: com.googleusercontent... (the iOS Scheme from API google console)

So on my app I have:

google: { callback_url: 'com.test.ios:/com.googleusercontent...', client_id: <client id from API Google as well (not the scheme)>, }

And I got the same error over and over again and not sure why I dont have it ! I followed the instructions..

Any idea?

ghost avatar Nov 16 '17 13:11 ghost

Your callback_url looks incorrect. The scheme (the initial part of the URL before the : character) should match to the URLScheme in your Info.plist.

The com.test.ios identifier is just a unique name for your application, not a part of the URL scheme.

Typically, a google redirect URI would look something like this:

com.googleusercontent.apps.GOOGLE_OAUTH_APP_GUID:/oauth2redirect/google

jevakallio avatar Nov 24 '17 17:11 jevakallio