I have implemented google login inside app, so far login is working well.
The problem is that suppose i have logged in my app and then i closed app and go to Google and go to Settings -> Security -> Manager third-party access -> MY_APP_NAME and then there is button which says “REMOVE ACCESS” which removes access to google account to my app and all logins will become invalid. but now whenever i call
GoogleAuthUtil.getToken(context, account, DriveScopes.DRIVE) this method first time throws exception
UserRecoverableAuthException(with help of this exception user can grant permission again) but now problem is that i think this exception is only thrown one time suppose if user again “REMOVE ACCESS”(by above process again) then if we call
getToken then it won’t throws that exception again and returns token but if i use this token for
Google Drive then google drive says
"message": "Invalid Credentials",
"message": "Invalid Credentials"
So what would be best way to handle REMOVE ACCESS, is handling it with
UserRecoverableAuthException or there is other way to handle it ?