Google-signin: IOS login issue

Created on 2 Jun 2017  路  10Comments  路  Source: react-native-google-signin/google-signin

I am getting issue in login.

I got bellow error message:

Exception 'Your app is missing support for the following URL schemes: [google id] was thrown while invoking signIn on target RNGoogleSignin with params ( )

馃挜 Build Issue

Most helpful comment

For me I used in JS file #id.apps.usercontent.com instead of #id.apps.googleusercontent.com.

Verify that you have the same URL schemes defined in your INFO.plist and in your js file like this:

await GoogleSignin.configure({
        iosClientId: '#id.apps.googleusercontent.com',
        webClientId: '#id.apps.googleusercontent.com',
        offlineAccess: false
      });

Then in your INFO.plist, the URL should be:
com.googleusercontent.apps.#id
and
#id.apps.googleusercontent.com

This solved my problem.

All 10 comments

I had the same issue. Just figured it out! In Xcode => Info Tab => URL Types section, make sure you set both URL Schemes (e.g. com.googleusercontent.apps.#-id) and Identifier (e.g. #-id.apps.googleusercontent.com). I was missing the Identifier value.

I'm getting the same error. @pchengsf can you elaborate a bit. Seems like there is no combination of client id and reverse client id that will satisfy this error...

When I add them both as comma-separated url scheme then I miss the red error and get a 400 from google that says invalid parameter value for redirect_uri invalid scheme

For me I used in JS file #id.apps.usercontent.com instead of #id.apps.googleusercontent.com.

Verify that you have the same URL schemes defined in your INFO.plist and in your js file like this:

await GoogleSignin.configure({
        iosClientId: '#id.apps.googleusercontent.com',
        webClientId: '#id.apps.googleusercontent.com',
        offlineAccess: false
      });

Then in your INFO.plist, the URL should be:
com.googleusercontent.apps.#id
and
#id.apps.googleusercontent.com

This solved my problem.

@satishSKY
I suppose you're getting the error on ios ?
If so , have you added changes to AppDelegate.m ?

I'm currently facing this issue. Tried all proposed solutions but I'm still getting an invalid_request return from Google API.

Invalid parameter value for redirect_uri: Invalid scheme: <CLIENT_ID>

Thanks!

@satishSKY what changes is @konstantin-mohin talking abt ?
M having same error in my ios GoogleSignIn ..
Please help me whit this

@khadkaPratik I've solved mine. I've mistakenly used the wrong client_id. Note that the web client id and client id are different. Try checking your ids. It's not a syntax issue. You're just using a wrong ID. Sorry, can't give specifics. I'm not currently in front of my machine.

Here is what I did to my project to work google Signin

await GoogleSignin.configure({
iosClientId: 'Get This From GoogleAPi Library',
webClientId: 'Get this from google Api Library ',
offlineAccess: false
  1. iosClientId === your CLIENT_ID value from plist file, not REVERSED_CLIENT_ID
  2. Add to url types in xcode CLIENT_ID and REVERSED_CLIENT_ID

Check out our updated example app which shows how everything should be properly configured.

Open a new issue if this is still a problem.

Was this page helpful?
0 / 5 - 0 ratings