I have created a hybrid mobile application using Salesforce Ionic starter app from this url: http://coenraets.org/blog/cordova-phonegap-3-tutorial/.
I am facing a problem, that every time a user logs in he has to allow the connected app. I think it should be only once that the user should Allow and for his subsequent logins he should be given the access normally as done with Facebook or Twitter OAuth.
I think I am not setting some parameter or making some call properly.
I am using the ForceJS SDK and calling the force.init to initialise it. It automatically calls the custom salesforce oauth plugin for cordova. Please help.
Generally speaking (I'm not familiar with SalesForce mobile dev) if you are using the SDK provided correctly (seemed hard to misuse, only it didn't support the latest Cordova versions?) it should keep the app allowed. That indicates that the problem is with your SalesForce settings.
Inside SalesForce, go to
Setup | Administration Setup | Manage Apps | Connected Apps
and have a look at
Require Users to Log In
option. Is it set so that users only need to log in the first time they use the app, and the permissions are maintained?
If that doesn't help, try out the settings described here here, especially the refresh token part.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With