Can't check IsTwoFactorClientRemembered when in ServerInteractive mode #52416
Unanswered
geistchevalier
asked this question in
Q&A
Replies: 1 comment
-
|
I´d like to know that too. Got the same problem. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm playing around with server side render Blazor the new .net 8.0, I noticed that if I set the rendermode of my login page (login.razor) to
@rendermode InteractiveServer, causes it to throw an error when I runawait SignInManager.IsTwoFactorClientRememberedAsyncin a separate injected helper class (loginhelper.cs). It would fail with the message ofonstarting cannot be set because the response has already started.Drilling down I found that it would fail at
SignInManager<TUser>.Context.AuthenticateAsync(IdentityConstants.TwoFactorRememberMeScheme)It executes just fine if I removed the
@rendermode InteractiveServerI understand enough to recognize that this is related to the HttpContext, but not enough to understand the flow to think of a fix/workaround. Is my only option to remove the
InteractiveServerrendermode if I want to check if the current user passes theIsTwoFactorClientRememberedAsynccheck?Beta Was this translation helpful? Give feedback.
All reactions