CaptainMorgan
CaptainMorgan

Reputation: 1253

identityserver 3 setting up auto logout when idle time is exceeded

I've inherited a web application that uses IdentityServer 3 for authentication. I'm a new user to this and I'm trying to figure out how to make the application time out after 5 minutes. So if the user were to leave their computer and come back in 6 minutes, the application would have been logged out and they would be seeing the login page. Any tips or links to articles that would assist me getting this working? I've been searching for a few hours and found nothing.

Upvotes: 0

Views: 556

Answers (1)

m3n7alsnak3
m3n7alsnak3

Reputation: 3156

This is the bast article that you can use in your scenario.

Also have a look at the latest documentation. I see that you are inheriting an existing solution, so may be the case with starting it from scratch wont work.

In general, you need a method that will clear the cookie and force the logout. Something like:

public ActionResult Logout()
{
    Request.GetOwinContext().Authentication.SignOut();
    return Redirect("/");
}

More info for this specific thing here.

Now the exact call to this method is up to you, but there are a lot of options.

Hope that this helps.

Upvotes: 1

Related Questions