Azureはじめました

Windows Azureで業務システムを組んでみる日記

Microsoft.Owin.Security.AuthenticationManagerでサインアウトができない

The issue is easily reproduced in the default asp.net project template by setting the validateInterval parameter of the OnValidateIdentity to 1 minute, and then waiting 1 minute before clicking the log off button. If the call to the action that calls SignOut happens to trigger the regeneration of the identity, the user won't be signed out. Issue was reproduced with both the 2.0 and 2.1 rc identity packages, using either OWIN 2.1 and 3.0 rc. If it is the intended design, what's a sensible workaround?

ASP.NET Identity - View Issue #2347: AuthenticationManager.SignOut doesn't work if identity was regenerated in current request

こりゃ何かやらかしたな。

Can you replace the AuthenticationManager.Signout() with

AuthenticationManager.Signout(DefaultAuthenticationTypes.ApplicationCookie);  

This should ideally fix the issue

ASP.NET Identity - View Issue #2347: AuthenticationManager.SignOut doesn't work if identity was regenerated in current request