From 6fcee9515f439cd3f8da54977f97280e8056eee4 Mon Sep 17 00:00:00 2001 From: Chris Patrick Date: Thu, 30 Nov 2017 17:07:28 +0200 Subject: [PATCH] Set properties on the context before calling OnAuthenticated so they are available to the callback (#145) Addresses #143 --- .../MicrosoftAccountAuthenticationHandler.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Microsoft.Owin.Security.MicrosoftAccount/MicrosoftAccountAuthenticationHandler.cs b/src/Microsoft.Owin.Security.MicrosoftAccount/MicrosoftAccountAuthenticationHandler.cs index 8eb4754e..3bb55a70 100644 --- a/src/Microsoft.Owin.Security.MicrosoftAccount/MicrosoftAccountAuthenticationHandler.cs +++ b/src/Microsoft.Owin.Security.MicrosoftAccount/MicrosoftAccountAuthenticationHandler.cs @@ -121,10 +121,10 @@ protected override async Task AuthenticateCoreAsync() context.Identity.AddClaim(new Claim(ClaimTypes.Email, context.Email, "http://www.w3.org/2001/XMLSchema#string", Options.AuthenticationType)); } - await Options.Provider.Authenticated(context); - context.Properties = properties; + await Options.Provider.Authenticated(context); + return new AuthenticationTicket(context.Identity, context.Properties); } catch (Exception ex)