I have to create one mobile application using Salesforce mobile SDK where user does not need to input the login credentials to access the data. For this the scenario I am thinking of that I can create one salesforce user and using that salesforce user I can login in SDK automatically in background without explicitly prompting for login details from application user.

Please let me know if this scenario is correct or if there is any alternative available rather than Salesforce Mobile SDK.

1 Answer 1


It is not possible to completely bypass login using the Salesforce Mobile SDK. There are however a few things you can do.

1) If you're using Communities, you can use a custom auth screen as described here. You can pre-fill the auth params on the custom screen if required.

2) You can do deferred authentication as described here. This will delay the auth dialog until your main activity is launched.

3) The other alternate is to use the zKSforce library instead of Salesforce Mobile SDK but that's not an ideal solution as you then miss out on all the functionality offered by Mobile SDK such as REST API wrappers, SmartStore, session management etc.

Having mentioned these, I do want to point out that if you use the Mobile SDK - you can provision the app so that the user will never be logged out (until manually done and you can control that by hiding the Logout button) so it's effectively a one-time process - I've used this trick in several of my apps and it works well.

  • Thanks for the answer Gaurav. But my query is if I want to host a public application on SFDC for which I don't require any auth details from user; in that case can I use Salesforce Mobile SDK? Jun 20, 2016 at 13:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .