Automated Logout after reach 5 Minute of being idle for mobile application.

Automated Logout after reach 5 Minute of being idle for mobile application.

  

Hi, 

I would like to address a question on how to make an automated logoff for a user that has been ible for 5 minute?

I have taken a few primary steps according from multiple forum pages. Firstly, I have changed the security setting on my application management. The image below is my common login setting. Once I've applied this setting and with that, I  continued to make a new session-authentication(rememberPassword = false) application. Once, the apps is ready, I've tested it on web browser and this setting seems not be working since after 5 minute of being idle, I still haven't been logged out by the system. Can anyone help me on this?


Besides, I've tried to change the session run-time in machine.config for .NET but I'm not sure where to begin. Do I need to create a new source code in for terminating a session or modify existed code? If, the line is existed, on which line can I find it? 

Thank you for your time. 

Sincerely, 

Sharizad Mohamad

Sharizad Mohamad wrote:

Hi, 

I would like to address a question on how to make an automated logoff for a user that has been ible for 5 minute?

I have taken a few primary steps according from multiple forum pages. Firstly, I have changed the security setting on my application management. The image below is my common login setting. Once I've applied this setting and with that, I  continued to make a new session-authentication(rememberPassword = false) application. Once, the apps is ready, I've tested it on web browser and this setting seems not be working since after 5 minute of being idle, I still haven't been logged out by the system. Can anyone help me on this?


Besides, I've tried to change the session run-time in machine.config for .NET but I'm not sure where to begin. Do I need to create a new source code in for terminating a session or modify existed code? If, the line is existed, on which line can I find it? 

Thank you for your time. 

Sincerely, 

Sharizad Mohamad

Hello Sharizad you can not do this by changing theses configurations. You need control this on mobile side using a JavaScript function with some logic to detect inactivity. 

You can instantiate a timer using somethink like this:


var myVar = setInterval(function(){ verifyIdle() }, 30000);

function verifyIdle() {
    $actions.someclientaction();
}


And if you need stop the timer use the function bellow:


function myStopFunction() {
    clearInterval(myVar);
}


Hope this helps.


Alexandre Costa wrote:

Sharizad Mohamad wrote:

Hi, 

I would like to address a question on how to make an automated logoff for a user that has been ible for 5 minute?

I have taken a few primary steps according from multiple forum pages. Firstly, I have changed the security setting on my application management. The image below is my common login setting. Once I've applied this setting and with that, I  continued to make a new session-authentication(rememberPassword = false) application. Once, the apps is ready, I've tested it on web browser and this setting seems not be working since after 5 minute of being idle, I still haven't been logged out by the system. Can anyone help me on this?


Besides, I've tried to change the session run-time in machine.config for .NET but I'm not sure where to begin. Do I need to create a new source code in for terminating a session or modify existed code? If, the line is existed, on which line can I find it? 

Thank you for your time. 

Sincerely, 

Sharizad Mohamad

Hello Sharizad you can not do this by changing theses configurations. You need control this on mobile side using a JavaScript function with some logic to detect inactivity. 

You can instantiate a timer using somethink like this:


var myVar = setInterval(function(){ verifyIdle() }, 30000);

function verifyIdle() {
    $actions.someclientaction();
}


And if you need stop the timer use the function bellow:


function myStopFunction() {
    clearInterval(myVar);
}


Hope this helps.


Thank you for your reply. 

I've found the javascript for sessionTimeout but I have issue in implementing this javascript. In my opinion, it should be implemented in client-side. This action will only be triggered after user login, therefore once a user login, this javascript will be triggered. 

Should I put the javascript in login's logic by using Js in block or is there any other way to implement this sessionTimeout javascript? 

Thanks


Diamond Eight wrote:

Alexandre Costa wrote:

Sharizad Mohamad wrote:

Hi, 

I would like to address a question on how to make an automated logoff for a user that has been ible for 5 minute?

I have taken a few primary steps according from multiple forum pages. Firstly, I have changed the security setting on my application management. The image below is my common login setting. Once I've applied this setting and with that, I  continued to make a new session-authentication(rememberPassword = false) application. Once, the apps is ready, I've tested it on web browser and this setting seems not be working since after 5 minute of being idle, I still haven't been logged out by the system. Can anyone help me on this?


Besides, I've tried to change the session run-time in machine.config for .NET but I'm not sure where to begin. Do I need to create a new source code in for terminating a session or modify existed code? If, the line is existed, on which line can I find it? 

Thank you for your time. 

Sincerely, 

Sharizad Mohamad

Hello Sharizad you can not do this by changing theses configurations. You need control this on mobile side using a JavaScript function with some logic to detect inactivity. 

You can instantiate a timer using somethink like this:


var myVar = setInterval(function(){ verifyIdle() }, 30000);

function verifyIdle() {
    $actions.someclientaction();
}


And if you need stop the timer use the function bellow:


function myStopFunction() {
    clearInterval(myVar);
}


Hope this helps.


Thank you for your reply. 

I've found the javascript for sessionTimeout but I have issue in implementing this javascript. In my opinion, it should be implemented in client-side. This action will only be triggered after user login, therefore once a user login, this javascript will be triggered. 

Should I put the javascript in login's logic by using Js in block or is there any other way to implement this sessionTimeout javascript? 

Thanks


I posted a forge plugin for that based on chrome.idle plugin. https://www.outsystems.com/forge/component-overview/4922/chrome-idle-plugin You can place the block in the layout and implement a logoff on idle event. 


Diamond Eight wrote:

Hi, 

I would like to address a question on how to make an automated logoff for a user that has been ible for 5 minute?

I have taken a few primary steps according from multiple forum pages. Firstly, I have changed the security setting on my application management. The image below is my common login setting. Once I've applied this setting and with that, I  continued to make a new session-authentication(rememberPassword = false) application. Once, the apps is ready, I've tested it on web browser and this setting seems not be working since after 5 minute of being idle, I still haven't been logged out by the system. Can anyone help me on this?


Besides, I've tried to change the session run-time in machine.config for .NET but I'm not sure where to begin. Do I need to create a new source code in for terminating a session or modify existed code? If, the line is existed, on which line can I find it? 

Thank you for your time. 

Sincerely, 

Sharizad Mohamad

Hi Diamond Eight.,

You can take a look here: https://www.outsystems.com/forge/component/1886/login-session-timeout-sample/

Regards,

Ellakkiya.S