SignInManager fix for external auth

This commit is contained in:
Hao Kung 2015-06-30 10:29:19 -07:00
parent 8bace4b197
commit 670614cdc5
1 changed files with 2 additions and 2 deletions

View File

@ -398,8 +398,8 @@ namespace Microsoft.AspNet.Identity
public virtual async Task<ExternalLoginInfo> GetExternalLoginInfoAsync(string expectedXsrf = null)
{
var auth = new AuthenticateContext(IdentityOptions.ExternalCookieAuthenticationScheme);
await Context.Authentication.AuthenticateAsync(IdentityOptions.ExternalCookieAuthenticationScheme);
if (auth == null || auth.Principal == null || auth.Properties == null || !auth.Properties.ContainsKey(LoginProviderKey))
await Context.Authentication.AuthenticateAsync(auth);
if (auth.Principal == null || auth.Properties == null || !auth.Properties.ContainsKey(LoginProviderKey))
{
return null;
}