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

    • 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
  1. i have one question, how to turn off that alert that “abcProject” wants to use google.com to sign in ? or how to change that alert? can you please help?

    Reply
  2. superb tutorial it was. i am getting one error, says developer error status code=10 , getting error only in android. working fine in IOS. can you please suggest me, what can i do ?

    Reply

Leave a Comment

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