Hi,
I am using OWIN authentication with MVC 5. Here are the code for my StartUp.cs
public void ConfigureAuth(IAppBuilder app)
{
app.UseCookieAuthentication(new CookieAuthenticationOptions
{
AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
LoginPath = new PathString("/Account/Login"),
ExpireTimeSpan = new TimeSpan(60000000000)
});
app.UseExternalSignInCookie(DefaultAuthenticationTypes.ExternalCookie);
}The expiration time is set to 60000000000 nano seconds.
Now the requirement is when the cookie is expired, I need to redirect to Login screen.
Basically I want to achieve the Forms authenitcation timeout feature with Microsoft.AspNet.Identity and OWIN.
How can I do that?