From e74496c079554651583cc2f23db12efbd259e307 Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Thu, 17 Jul 2014 15:07:34 -0700 Subject: [PATCH] Remove workaround try/catch for authenticate bug --- .../HttpAuthenticationManager.cs | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/Microsoft.AspNet.Identity.Authentication/HttpAuthenticationManager.cs b/src/Microsoft.AspNet.Identity.Authentication/HttpAuthenticationManager.cs index 2da277bc0b..0778c89f7e 100644 --- a/src/Microsoft.AspNet.Identity.Authentication/HttpAuthenticationManager.cs +++ b/src/Microsoft.AspNet.Identity.Authentication/HttpAuthenticationManager.cs @@ -29,17 +29,9 @@ namespace Microsoft.AspNet.Identity.Authentication public async Task IsClientRememeberedAsync(string userId) { - try - { - var result = - 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; - } + var result = + await Context.AuthenticateAsync(TwoFactorRememberedAuthenticationType); + return (result != null && result.Identity != null && result.Identity.Name == userId); } public void RememberClient(string userId)