You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The first cookie scheme is used to sign-in the user with the app. The second scheme is used to perform Graph calls later (optional) and should not be used to identify the user for the application. However, after I logged in with my Microsoft Account (via ConsentHandler) and it redirects back to my application it always overwrites my HttpContext.User:
try{varme=await GraphServiceClient.Me.GetAsync(c => c.Options.WithAuthenticationScheme(OpenIdConnectDefaults.AuthenticationScheme));}catch(Exceptione){
ConsentHandler.HandleException(e);}// HttpContext.User + Claims are overwritten
Is there a way to prevent this? Or somehow manage multiple user identities in parallel?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am using a multi auth scheme in my Blazor application:
The first cookie scheme is used to sign-in the user with the app. The second scheme is used to perform Graph calls later (optional) and should not be used to identify the user for the application. However, after I logged in with my Microsoft Account (via
ConsentHandler
) and it redirects back to my application it always overwrites myHttpContext.User
:Is there a way to prevent this? Or somehow manage multiple user identities in parallel?
Beta Was this translation helpful? Give feedback.
All reactions