Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RNGoogleSignInError: Error when revoking access ... #914

Open
lrahmani-eve opened this issue Aug 31, 2020 · 5 comments
Open

RNGoogleSignInError: Error when revoking access ... #914

lrahmani-eve opened this issue Aug 31, 2020 · 5 comments

Comments

@lrahmani-eve
Copy link

No Template

Sometimes I get this error when signing out on ios:

RNGoogleSignInError: Error when revoking access ...

Here is the signout code:
Screen Shot 2020-08-30 at 11 08 32 PM

   signOut = async () => {
      const isSignedIn = await GoogleSignin.isSignedIn();
      if (isSignedIn) {
        try {
          await GoogleSignin.revokeAccess();
          await GoogleSignin.signOut();
        } catch (error) {
          onError(Error(error));
        }
      }
    }
@lrahmani-eve lrahmani-eve changed the title RNGoogleSignInError: Error when revoking access when signing out on ios RNGoogleSignInError: Error when revoking access ... Aug 31, 2020
@HerbertLim
Copy link

HerbertLim commented Sep 16, 2020

This happens to me also. I tried to remove await GoogleSignin.revokeAccess();, but this error still happens.
In case of iOS simulator, iPhone X device(iOS 13.7), Galaxy S10 device(Android 10), I can sign out with no error.
As of now, this error occurs only when testing with iPhone 8 (iOS 13.7)


After struggling with this issue for an hour, I deleted app in iPhone 8 and started testing via xcode. This time no error happened.

@naveenrawat51
Copy link

naveenrawat51 commented Jan 3, 2021

have a look on following code:
GoogleSignin.configure({
webClientId:
'866234214-r10f3la7p9ujb13065w3423121k.apps.googleusercontent.com',
offlineAccess: true, // if you want to access Google API on behalf of the user FROM YOUR SERVER
forceCodeForRefreshToken: true, // [Android] related to serverAuthCode, read the docs link below *.
iosClientId:
'8665522342453453453411-i0me0qnkjasd98asa9asdad3gkqb5k6cmi9p2.apps.googleusercontent.com', // [iOS] optional, if you want to specify the client ID of type iOS (otherwise, it is taken from GoogleService-Info.plist)
});

should match with info.plist:
<!-- google sign in specific code--> <key>CFBundleURLTypes</key> <array> <dict> <key>CFBundleURLName</key> <string>866234214-r10f3la7p9ujb13065w3423121k.apps.googleusercontent.com</string> <key>CFBundleURLSchemes</key> <array> <string>com.googleusercontent.apps.8665522342453453453411-i0me0qnkjasd98asa9asdad3gkqb5k6cmi9p2</string> </array> </dict> </array>

Screenshot 2021-01-03 at 11 52 47 AM

I hope it'll help you. entries should be matching with config and info.plist

@KrisLau
Copy link

KrisLau commented Aug 2, 2021

I'm not sure if this issue is the same as mine but I've noticed that this only happens on iOS and only after a couple hours has passed since login. If i login and immediately login, it works fine. Not sure if this is intended behavior

@MuriloDutra
Copy link

Any update on this issue guys?

@KrisLau
Copy link

KrisLau commented Aug 30, 2021

@MuriloDutra and anyone who might come to this issue later, look at #977 (specifically this comment). You don't need to revokeAccess on logout at all. revokeAccess should only be called if they are unlinking or deleting the account.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants