0

After a user has signed into a Google account and then manually removes that Google account via settings 'Accounts' a call to getLastSignedInAccount returns a GoogleSignInAccount instead of null and a call to vGoogleSignIn.hasPermissions` returns true.

Is there anyway to detect that an account is not active?

Presently I detect and handle it in the failure callback when an api call, which requires an authenticated user, is made.

GoogleSignInAccount account = GoogleSignIn.getLastSignedInAccount(this);
if (GoogleSignIn.hasPermissions(account, getFitnessOptions())) {
    // ...
}
RKRK
  • 1,284
  • 5
  • 14
  • 18
  • in this case, `.getLastSignedInAccount()` probably should already return `null`. file an issue, because it's a certain flaw, that the account gets removed but not the reference to it. – Martin Zeitler May 22 '19 at 00:43
  • Thanks. I filed a bug. –  Jun 03 '19 at 20:36

0 Answers0