we have an android app which is connected with Salesforce. From the Android app, we will pass the username and password to the salesforce to get oAuth token. I have created one checkbox field i.e. hasAccesstoAndroidApp__c on the user object. I need to get OAuth token from salesforce for a user who has hasAccesstoAndroidApp__c field value is true. For other users who have false value on the hasAccesstoAndroidApp__c field then need to pass the error message.
How we can implement this requirement.