PersistingRevalidatingAuthenticationStateProvider when global render mode is Auto with prerendering disabled #53111
Unanswered
danielgreen
asked this question in
Q&A
Replies: 0 comments
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.
Uh oh!
There was an error while loading. Please reload this page.
-
The .NET 8 Blazor Web App template includes the PersistingRevalidatingAuthenticationStateProvider, which sets up a subscription in its constructor.
I guess the intent of the subscription is for the callback to be invoked when the render mode changes to
InteractiveWebAssembly
.But will that work if prerendering is disabled globally i.e. App.Razor contains the following:
<HeadOutlet @rendermode="@RenderModeForPage" />
<Routes @rendermode="@RenderModeForPage" />
private IComponentRenderMode? RenderModeForPage => IsLoginPage ? null : AutoNoPrerender;
private static readonly IComponentRenderMode AutoNoPrerender = new InteractiveAutoRenderMode(prerender: false);
So the actual render mode is not
RenderMode.InteractiveWebAssembly
, rather it is a custom instance ofInteractiveAutoRenderMode
.Beta Was this translation helpful? Give feedback.
All reactions