Remove workaround try/catch for authenticate bug
This commit is contained in:
parent
bbb848ae1d
commit
e74496c079
|
|
@ -29,17 +29,9 @@ namespace Microsoft.AspNet.Identity.Authentication
|
||||||
|
|
||||||
public async Task<bool> IsClientRememeberedAsync(string userId)
|
public async Task<bool> IsClientRememeberedAsync(string userId)
|
||||||
{
|
{
|
||||||
try
|
var result =
|
||||||
{
|
await Context.AuthenticateAsync(TwoFactorRememberedAuthenticationType);
|
||||||
var result =
|
return (result != null && result.Identity != null && result.Identity.Name == userId);
|
||||||
await Context.AuthenticateAsync(TwoFactorRememberedAuthenticationType);
|
|
||||||
return (result != null && result.Identity != null && result.Identity.Name == userId);
|
|
||||||
}
|
|
||||||
// REVIEW: Why does Owin throw this for authenticate?
|
|
||||||
catch (InvalidOperationException)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RememberClient(string userId)
|
public void RememberClient(string userId)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue