31 thoughts on “Example of Google Sign In in React Native Android and iOS App”

  1. Thank you so much for this post.

    I was also facing this error: DEVELOPER_ERROR.

    I simply added my SHA-1 fingerprint in the firebase console and replaced the old google-ervice.json with the new one.

    Enabling the Google sign-in method and replacing the old webclientID with new one is a mandatory step.

    It’s now working for me.

    Reply
  2. Hi, I configured everything and made it to build on a real iPhone. When I press the google button it goes to the page to select the account and after select it reload and keep on google home page logged with the chosen account. If I get back to the app after that, it give the erro code ‘-1’. Can you help me?

    Reply
  3. Exception ‘Your app is missing support for the following URL schemes: com.googleusercontent.apps.*****************************************’ was thrown while invoking signIn on target RNGoogleSignin with params (
    1166,
    1167
    )

    When i click on SignIn Button, above error is fire.
    I got a many solutions and also implement it. I am not able to understand this error. Few days ago it was running well, In android running well, but not in IOS.

    Reply
  4. when i click “Sign in with Google” box will open and when i click one of my gmail account. then he display me 2 error in console. here is ( Message A non-recoverable sign in failure occurred, Some Other Error Happened ) help.?

    Reply
  5. hellow,
    i am facing issue in ios , that if ios device has not current date and time then it’s throwing error like this [Error: RNGoogleSignInError: Unknown error when signing in., Error Domain=org.openid.appauth.general Code=-15 “Issued at time is more than 600 seconds before or after the current time” UserInfo={NSLocalizedDescription=Issued at time is more than 600 seconds before or after the current time}].

    is there any solution ????

    Reply
    • This can be used for that

      // Sign in without a prompt
        // If accessToken is expiring, refresh it
        signInSilentlyPromise() {
          return new Promise((resolve, reject) => {
            const offSuccess = GoogleSignIn.onSignIn((data) => {
              offSuccess();
              offError();
              resolve(GoogleSignIn.normalizeUser(data));
            });
            const offError = GoogleSignIn.onSignInError((error) => {
              offSuccess();
              offError();
              reject(error);
            });
            RNGoogleSignIn.signInSilently();
          });
        },
      
      Reply
  6. Your code was really helpful and understandable,,, thanks!!
    i was able to sign in with google and facebook both but i cannot see the signed in users in my firebase console, why is it so can you please tell????

    Reply
  7. Error Domain=org.openid.appauth.general Code=-5 “Connection error making token request to ‘https://oauth2.googleapis.com/token’: 请求超时。.” UserInfo={NSLocalizedDescription=Connection error making token request to ‘https://oauth2.googleapis.com/token’: 请求超时。., NSUnderlyingError=0x282e1e310 {Error Domain=NSURLErrorDomain Code=-1001 “请求超时。” UserInfo={NSUnderlyingError=0x282e1e2b0 {Error Domain=kCFErrorDomainCFNetwork Code=-1001 “(null)” UserInfo={_kCFStreamErrorCodeKey=-2102, _kCFStreamErrorDomainKey=4}}, NSErrorFailingURLStringKey=https://oauth2.googleapis.com/token, NSErrorFailingURLKey=https://oauth2.googleapis.com/token, _kCFStreamErrorDomainKey=4, _kCFStreamErrorCodeKey=-2102, NSLocalizedDescription=请求超时。}}}

    Reply

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.