6

We have mixed authentication on our SharePoint 2013 site collection. I need to have FBA users automatically logged out after 30 minutes of inactivity, but they don't have to necessarily be redirected to the signout page.

I'm looking at "Web Page Security Validation" in central admin. It is turned on and set to expire after 30 minutes. What does this actually do? Is it just invalidating the form after 30 minutes, or is it logging the user out after 30 minutes?

1 Answer 1

1

The Web Page Security Validation feature helps enhance security by imposing a time limit on Web pages when a user submits information to the server. When a user tries to submit information to the server after the validation time-out expires, the user receives the error message that is mentioned in the "The security validation for this page has timed out." section.https://support.microsoft.com/en-us/kb/888828?wa=wsignin1.0

If all of that failed, why not just add Javascript to the master page that uses setTimeOut() to redirect the user to the logout page after 20 minutes? By default, this page is at /_layouts/SignOut.aspx but your FBA may have specified a different one. Source: Automatic Logout the User after "X" time in Sharepoint 2013

Here is the script: How to: enable inactivity log out for SharePoint server

You have to use code in master page.

$(document).ready(function () {
idleTime = 0;
LogOutInactive();
});

function LogOutInactive() {
var idleInterval = setInterval(timerIncrement, 60000);

$(this).mousemove(function (e) {
idleTime = 0;
});
$(this).keypress(function (e) {
idleTime = 0;
});
}

function timerIncrement() {
idleTime = idleTime + 1;
if (idleTime > 9) {
window.location = "http://[your site]/_layouts/15/SignOut.aspx";
}
}
1
  • I'm wondering if this can be implemented on the server side somehow, so that it's more secure.
    – matt
    Commented May 4, 2015 at 17:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.