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

Hybrid Local app - Custom login page
Hi, is it possible to have a custom login page in a hybrid local app?
I have tried to use the technique described in the Developer Guide p. 257, i.e. changing the login URL to a community login which can be customized. It works, but then the app ends up in the community itself, and not back in the app (in the index.html file of the app), as expected.
Am I doing something wrong? Should I customize the login page in some other fashion?
I have tried to use the technique described in the Developer Guide p. 257, i.e. changing the login URL to a community login which can be customized. It works, but then the app ends up in the community itself, and not back in the app (in the index.html file of the app), as expected.
Am I doing something wrong? Should I customize the login page in some other fashion?
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
The callback url in the App-definition is: demo2:///mobilesdk/detect/oauth/done
In the bootconfig.json, I have the following:
{
"remoteAccessConsumerKey": "(..my client secret..)",
"oauthRedirectURI": "demo2:///mobilesdk/detect/oauth/done",
"oauthScopes": [
"web",
"api"
],
"isLocal": true,
"startPage": "index.html",
"errorPage": "error.html",
"shouldAuthenticate": true,
"attemptOfflineLoad": false
}
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
What i will suggest is the use of all oAuth scope in your bootconfig.json file
try using below line in place of your existing code:
"api","web","full","chatter_api","visualforce","openid","custom_permissions","refresh_token","offline_access"
and yes try to give a simple url there is no need to use same which is being provided in devloper guide. You can use something like
sfdc://success
Try this and let me know once your done. Thanks.
@Sachin: I have tried both, but did not help.
Do I have to configure anything in the "Mobile App Settings" section of the connected-app definition?
{
...
"oauthScopes": [
"api","web","full","chatter_api","visualforce","openid","custom_permissions","refresh_token","offline_access",
"id", "profile", "email", "address", "phone"
],
...
}
Also, I'm running it as an iOS app through xCode, but that should not cause the problem :)
OK, weird, but it is working now...
What I tried was to create a new community and it worked with the new one. Then I re-checked with the old one, and this one is also working now... Could be some caching, or something, or maybe the oauth scopes have not been applied yet before...
Anyway, thanks guys!
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