Forum

Thread tagged as: Question, Forum

On session end

Hi all,

Is there a way to refresh the page on session end so that the user is logged out?

Also, how can I log users out when their account is inactive? I don't want the website logging people out just because their session has come to the end. Otherwise, can I show a message asking if users would like to extend their current session? Like something the banks do to secure their website...

Thanks.

Conor Harkins

Conor Harkins 0 points

  • 3 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Are you talking about Perch users, or site members using the Members app here?

Sorry, perch members app.

Drew McLellan

Drew McLellan 2638 points
Perch Support

I think you'd probably need to do that with JavaScript. When the page loads, call a timeout function set to the number of seconds until the end of the session, and when the function runs, check that the session hasn't been refreshed and then redirect or what have you.