Hi there I have a project in ASP MVC with Identity login usermanagement so far I have tried the following code it workes but it requires the page to be reload but What I want is to redirect automatically after the session expired
app.UseCookieAuthentication(new CookieAuthenticationOptions
{
AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
LoginPath = new PathString("/Account/Login"),
ExpireTimeSpan = TimeSpan.FromMinutes(5),
SlidingExpiration = false,
Provider = new CookieAuthenticationProvider
{
OnResponseSignIn = context => { context.Properties.AllowRefresh = true; context.Properties.ExpiresUtc = DateTimeOffset.UtcNow.AddMinutes(5); }
}
});