Outsystems Mobile: Alert User 1 hour before his persistent Login Expires

Hello,

We are using Persistent Login for our mobile app and i want to alert users at least 1 hour before the persistent login time expiration.


Could any one help me out, how i can get read the max idle time set in service center and alert the user?


Thanks,

Preeti Kumari


Try using a handler for the ontouchstart event.

Store the last touch time in any global variable, and update this variable in the touch handler. 


Regards,

Swatantra Kumar

Hi Preeti,

look to this documentation: Configure Mobile App Authentication

I believe that you can management some configurations with Factory Configuration.

Cheers,

Nuno Verdasca


Let me Explain the scenario

In Service center we have set the Max idle time as 12 Hours, so the user remains logged in to the application for next 12 hours from the time he/she logged in, even the application is closed/untouched/goes offline.(This is working fine).  Now we need below to be handle below scenario.

Step 1: User Login to the application let say at 10 am

Step 2: When 11 hours are past from his last login i.e. at 9 Pm user should get a message on screen saying you would be automatically logged out after 1 hours.

here the main challenge is how to read the Max idle time in code to add the check.


Hope it is clear.


Thanks,

Preeti Kumari


Swatantra Kumar wrote:

Try using a handler for the ontouchstart event.

Store the last touch time in any global variable, and update this variable in the touch handler. 


Regards,

Swatantra Kumar

I suggested to use the global variable to store the last active session (last touch time). Alongwith put a javascript on client side to check on regular interval to compare the offset from current time and the value of global variable then alert accordingly.

A nice javascript examle you may refer

https://stackoverflow.com/questions/1191865/code-for-a-simple-javascript-countdown-timer/1192001#1192001