You need to sign in to do that
Don't have an account?

Changing the login workflow
Hi,
Currently the login workflow using salesforce mobile SDK works this way
1) Launch your app (first time)
2) If you are not logged into salesforce
2 a) Show salesforce login page
2 b) Show permission screen
2 c) Navigate to the start page specified in bootconfig.json
(or)
2) if already logged in, navigate to start page specified in bootconfig.json (session token is already refreshed)
3) Upon on logout, show the salesforce login page again.
Is it possible to change this workflow such that
1) Launch your app (first time)
2)If not logged in Show a custom login page. (This just has a sign in button)
2 a) When button clicked, redirect to regular salesforce login page
2 b) Show salesforce login page
2 c) Show permission screen
2 d) Navigate to the start page specified in bootconfig.json
(or)
2) if already logged in, navigate to start page specified in bootconfig.json (session token is already refreshed)
3) Upon on logout, show the custom login page again instead of salesforce login page.
I looked at some posts http://boards.developerforce.com/t5/Mobile/Change-login-page-for-mobile-SDK/m-p/555933/highlight/true#M1145
But in this example, we are changing the entire login page on the server side, my aim is not to do this, but instead, simply provide a landing page on the app before login and after logout, instead of directly pointing to main salesforce login page.
I am not sure if this is even possible, but just wanted to check with the community.
Thanks,
Nikhil
This should be achievable, starting with SDK 2.0 and above. The MainActivity that you supply would have a single button to launch the login activity, and when that button is clicked, you can launch LoginActivity with an intent. However, this activity will need to have logic to check if an account exists, and show the button if the account does not exist. If an account exists, it should directly launch the activity that you would go to post-login. The above solution assumes that you're working with the Android Salesforce Mobile SDK. If you're working with the iOS version, deferred authentication is available there too.
Thanks for the quick reply. If you have any code snippets, could you please share them here. I will try to look into this as well.
-,
Nikhil
@kevin I am targeting both IOS and Android. I have a project structure, where most of the js code is shared between ios and android.