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
Hello Preeti,
As suggested by Swatantra Kumar, you can use global variables to save user login time and Persistent Timeout time. Instead of JavaScript you can check on OnApplicationReady as well as on OnApplicationResume client action that the difference between both is greater than persistent login or not. If yes give message to user about the same.
Thanks & Regards
Prajakta Roshankhede
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
Swatantra Kumar wrote:
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
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 Prajakta and Swatantra for your inputs.
I used the client variable newly introduced in outsytems mobile for keeping the value and then check on both application ready and resume event. and it is not showing the alert properly.
Preeti kumari