Disable sign out external cookie temporarily

Potential SignOut bug is preventing this from working correctly for now
This commit is contained in:
Hao Kung 2014-09-25 15:15:07 -07:00
parent 3c277090de
commit 2cb14932f7
2 changed files with 4 additions and 3 deletions

View File

@ -115,7 +115,7 @@ namespace IdentitySamples
options.Password.RequireLowercase = false;
options.Password.RequireUppercase = false;
options.Password.RequireNonLetterOrDigit = false;
options.SecurityStampValidationInterval = TimeSpan.Zero;
options.SecurityStampValidationInterval = TimeSpan.FromMinutes(1);
});
services.SetupOptions<GoogleAuthenticationOptions>(options =>
{

View File

@ -74,8 +74,9 @@ namespace Microsoft.AspNet.Identity
CancellationToken cancellationToken = default(CancellationToken))
{
var userIdentity = await CreateUserIdentityAsync(user);
// Always clear any external login cookies when signing in for real
Context.Response.SignOut(Options.ExternalCookie.AuthenticationType);
// Should always clear any external login cookies when signing in for real
// BUG: SignOut currently throws if auth type was not signed in
//Context.Response.SignOut(Options.ExternalCookie.AuthenticationType);
if (authenticationMethod != null)
{
userIdentity.AddClaim(new Claim(ClaimTypes.AuthenticationMethod, authenticationMethod));