16
Views
7
Comments
Mobile app getting logout automatically after keeping it idle overnight

Hi ,

I am facing issue in login session of mobile application. I logged in to my mobile application in night and kept in idle overnight and in morning when I open my application it is asking me to login again.

What I want?

I want user should get logged out only when he explicitly click on logout button in my application. i.e., Session should persist until user clicks on Logout.

Could you help me how I can achieve this in my project?

Thanks in advance.

Nidhi

2019-01-07 16-04-16
Siya
 
MVP

Do check if you have configured Max idle Time and Cookie expiration in Service Center -> Administration -> Security - > Applications Authentication to a higher value.  Also check you have set True for Remember Login in User_Login action.

Reference : https://success.outsystems.com/documentation/11/user_management/end_users_authentication/persistent_login/ 

2023-04-14 07-26-23
Nidhi Sardeshpande

Hi @Siya 

I dont have access to Security--Authentication  to set higher value there.

Thanks.

2025-07-22 10-30-27
Mandar Deshpande

You can use Client Storage Entity to store login information. You can use a flag in this Entity and check this on OnInitialize/OnReady. Set this flag on successful login and on Logout clear this.

Persistent client storage will help to stay logged in, as per your case.

2023-04-14 07-26-23
Nidhi Sardeshpande

Hi @Mandar Deshpande 

I tried this way but its not working.

Thanks.

2025-07-22 10-30-27
Mandar Deshpande
2025-08-07 06-30-56
Amit J
Champion

Hi @Nidhi Sardeshpande

Use “Remember Login” in Login Logic, Make sure the Login action in your mobile app uses the RememberLogin parameter as True.
This saves a persistent login token securely on the device. On app restart or resume, OutSystems uses the token to restore the session.

Mobile apps are stateless by nature — server sessions expire after inactivity, but token-based login restores automatically if RememberLogin=True 
Do not store user session state only in server-side variables (e.g., Session.UserId), as these are reset on timeout. 

2023-04-14 07-26-23
Nidhi Sardeshpande

Hi @Amit Jain 

In my application RememberLogin is already set to true but still it ig loggedout if I keep my application idle for overnight.

Thanks.


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.