I review some posts about that but I can't still find answer on my question. I trying to create auto log off for users who spent more then defined time. Example if I specified 30 min web app need to automatically log off user.
I am using OWIN with MVC 5 and my configuration in Startup.Auth class are:
app.UseCookieAuthentication(new CookieAuthenticationOptions
{
AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
LoginPath = new PathString("/Account/Login"),
CookieSecure = CookieSecureOption.SameAsRequest,
SlidingExpiration = true,
ExpireTimeSpan = new System.TimeSpan(0, 0, expireMinutes, 0, 0),
});
and also:
app.UseExternalSignInCookie(DefaultAuthenticationTypes.ExternalCookie);
app.UseCookieAuthentication(new CookieAuthenticationOptions());
app.UseWsFederationAuthentication(
new WsFederationAuthenticationOptions
{
Wreply = WAADReturnURL,
Wtrealm = realm,
MetadataAddress = metadata,
});
app.UseMicrosoftAccountAuthentication(
new Microsoft.Owin.Security.MicrosoftAccount.MicrosoftAccountAuthenticationOptions()
{
ClientId = "xxxx",
ClientSecret = "xxxx",
});
app.UseYahooAuthentication(
new YahooAuthenticationOptions()
{
ConsumerKey = "xxxx",
ConsumerSecret = "xxxx",
});
app.UseLinkedInAuthentication(
new LinkedInAuthenticationOptions()
{
ClientId = "xxxx",
ClientSecret = "xxxx",
});
app.UseGoogleAuthentication(new GoogleOAuth2AuthenticationOptions()
{
ClientId = "xxxx",
ClientSecret = "xxxx",
});
app.UseFacebookAuthentication(new Microsoft.Owin.Security.Facebook.FacebookAuthenticationOptions()
{
AppId = "xxxx",
AppSecret = "xxxx",
});
I am using WAAD and third party providers such as Facebook, Linkedin...
Also my web.config I set following configuration:
<authentication mode="None">
</authentication>
I review following post also but without solution: MVC 5 Identity Automatic Logout
Thanks