googleworkspace / android-samples

Android samples for Google Workspace APIs
Apache License 2.0
636 stars 410 forks source link

Client thinks it is signed in but API says no #65

Closed NLLAPPS closed 6 years ago

NLLAPPS commented 6 years ago

signIn() BaseDemoActivity.java does not work if user revokes permission form their Google account. if (signInAccount != null && signInAccount.getGrantedScopes().containsAll(getRequiredScopes())) returns true and initializeDriveClient(signInAccount) called.

You end-up APiException with error code 4.

Isn't there any way to check if user signed it?

asrivas commented 6 years ago

Are you still having this issue? Have you authenticated successfully before with that account before? Do not revoke the permission if you'd like to use the app.

NLLAPPS commented 6 years ago

This is still relevant but we have changed how we check signing state since then. Since we cannot control users actions on revoke we had no way of knowing if error was die to revocation or not