function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Talha AliTalha Ali 

Getting stuck in loop after user is revoked

I have an issue. I'm currently trying to develop and app that uses the Salesforce Android mobile SDK. I can make calls our to Salesforce just fine. I'm trying to handle a situation like this:
Manager goes to salesforce.com and goes to the "Connected App User's Usage" page and from there revokes one or all the users. This causes any future calls to Salesforce to return an IllegalStateException. 

The issue I'm having is that I cannot login back into my app with Salesforce unless I uninstall and reintall it. I keep getting stuck in a loop where I enter my credentials, allow my app, then go back to the screen where I enter my credentials. Can this situation be take care of from the apps side? Thanks.
Gaurav KheterpalGaurav Kheterpal
No, if the connected app user has been revoked explicitly - you will need to follow the mentioned steps to use the app again on device. This is how it's supposed to work or else it would be a security loophole.

If my answer helps resolve your query, please mark it as the 'Best Answer' & upvote it to benefit others and improve the overall quality of Discussion Forums.

Gaurav Kheterpal
Certified Force.com Developer| Salesforce Mobile Evangelist| Developer Forums Moderator| Dreamforce Speaker