I have created an Android App that connects to Salesforce and uses OAuth to authenticate users.
I have set of community users and these users login to the app using these credentials. I want to disable these community users from accessing Salesforce directly.
They should not be able to access the salesforce web link and log in with their community credentials. Only login should be via the app that I have created.
Can this be done ?
Attribution to: Vidya
Possible Suggestion/Solution #1
If you go to the Commuity settings and click on Login Page, you can see the following options.
If you disable the username and password users are only able to login via your SSO or auth provider. I have tried this in a test community where Open Id is set up, and the user gets an error message if they navigate to the login page of the community.
Attribution to: ManSpan
Possible Suggestion/Solution #2
You can add a java scrip code on that users home page. This code will redirect user to log out page. Here is reference how you can do this How can I execute JavaScript on a SFDC Standard Detail Page?
Attribution to: AtulRajguru9
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/34339