Hi everyone,
I’m developing a mobile application in OutSystems and would like to implement persistent login.
My requirement is that users should log in only once. When they close and reopen the application, they should be automatically authenticated and redirected to the Home screen, without entering their credentials again.
I’m considering using Local Storage for this purpose. I also want to ensure that the authentication check is secure and performs quickly, without causing a noticeable delay during app startup.
What would be the recommended and most efficient approach to implement this in OutSystems Mobile?
Thanks in advance for your guidance.
You don’t need to implement your own “remember me” with Local Storage. OutSystems mobile (and Reactive) already supports persistent login natively, and that’s both the recommended and the most efficient approach.
In your login logic, call the system action User_Login with:
User_Login
Username
Password
RememberLogin
When RememberLogin is True, OutSystems issues persistent authentication cookies/tokens so that, after the first login, the user doesn’t need to re‑enter credentials unless:
User_Logout
This is the official “remember me” mechanism for Mobile and Reactive apps. Persistent Login
Environment-wide settings are configured in Service Center:
For mobile apps, these settings control how long “log in once” actually means in practice. Set security for an environment
On your initial “splash” or “launch” screen:
CheckSession()
GetUserId()
Session.UserId
Because the platform manages cookies/tokens under the hood and they’re checked on the first server call, you don’t need extra Local Storage checks. The server-side authentication lookup is already optimized and typically very fast.
Do not store the username/password locally (even encrypted):
If you need to remember some user context locally (e.g., last logged-in username, preferences), use Client Variables / Local Storage for non-sensitive data only.
Depending on your use case:
Summary: Use User_Login with RememberLogin=True + configure persistent authentication in Service Center, and on app startup just check if the session is authenticated and redirect accordingly. This gives you secure, fast, and native persistent login without managing Local Storage yourself.
RememberLogin=True