I’d like to know if there is any way to login a previously logged in user without their username/password. For example, if they are logged in, and they kill the iOS App, then on a successive launch, they would have to re-login. I’d like to have this done automatically. I can do this by storing their user/pass into the keychain, but if there’s a token I can use to religion, I’d rather store that than the user’s username/password.
I would really like to see the answer to this. How do you use session objects, cookies and session timeouts?
Hi James and Darel,
We just updated the docs with this information. Please see the following:
- Android:
see the “stayLoggedIn” argument for the “login” methods:
http://backendless.com/documentation/users/android/android_login.htm
JavaScript:
Same as with Android, see the “stayLoggedIn” argument for the login method:
http://backendless.com/documentation/users/js/js_login.htm
iOS:
See the “Remembering Login” section on this page:
http://backendless.com/documentation/users/ios/ios_login.htm
REST:
See the “Maintaining User Session” section here:
http://backendless.com/documentation/users/rest/login.htm
Regards,
Mark
Mark,
Thanks for the clarification.
You are welcome, Darel. I apologize it took so long. Btw, updates for ActionScript (Flash/Flex) and .NET are coming up - these 2 SDKs do not support the feature for saving login info yet.
Regards,
Mark
Is there a better way to use this token to restore the Backendless.UserService.CurrentUser() ?
Currently, I am using Backendless.UserService.isValid(), if it returns true, but the current user is null, I am requesting the user using the user id (UserIdStorageFactory.instance.getStorage().get()) via Backendless.UserService.
This is using the Android SDK