-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Prerendering Blazor WASM .NET 5 app with authentication throws error #28025
Copy link
Copy link
Closed
Labels
✔️ Resolution: DuplicateResolved as a duplicate of another issueResolved as a duplicate of another issuePriority:2Work that is important, but not critical for the releaseWork that is important, but not critical for the releaseStatus: Resolvedaffected-mediumThis issue impacts approximately half of our customersThis issue impacts approximately half of our customersarea-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor ComponentsenhancementThis issue represents an ask for new feature or an enhancement to an existing oneThis issue represents an ask for new feature or an enhancement to an existing onefeature-blazor-wasmThis issue is related to and / or impacts Blazor WebAssemblyThis issue is related to and / or impacts Blazor WebAssemblyfeature-blazor-wasm-authfeature-prerenderingIssues related to prerendering blazor componentsIssues related to prerendering blazor componentsseverity-blockingThis label is used by an internal toolThis label is used by an internal tool
Milestone
Metadata
Metadata
Assignees
Labels
✔️ Resolution: DuplicateResolved as a duplicate of another issueResolved as a duplicate of another issuePriority:2Work that is important, but not critical for the releaseWork that is important, but not critical for the releaseStatus: Resolvedaffected-mediumThis issue impacts approximately half of our customersThis issue impacts approximately half of our customersarea-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor ComponentsenhancementThis issue represents an ask for new feature or an enhancement to an existing oneThis issue represents an ask for new feature or an enhancement to an existing onefeature-blazor-wasmThis issue is related to and / or impacts Blazor WebAssemblyThis issue is related to and / or impacts Blazor WebAssemblyfeature-blazor-wasm-authfeature-prerenderingIssues related to prerendering blazor componentsIssues related to prerendering blazor componentsseverity-blockingThis label is used by an internal toolThis label is used by an internal tool
Type
Fields
Give feedbackNo fields configured for issues without a type.
I have a Blazor WASM application using OIDC authentication (based on this https://docs.microsoft.com/en-us/aspnet/core/blazor/security/webassembly/standalone-with-authentication-library?view=aspnetcore-5.0&tabs=visual-studio). This works fine.
Now, when I add WASM prerendering (based on this https://docs.microsoft.com/en-us/aspnet/core/blazor/security/webassembly/additional-scenarios?view=aspnetcore-5.0#support-prerendering-with-authentication), then it no longer works. I get a strange behavior after the app loads and 404 errors. The redirect after the login then also hits a 404.
In fact, every route is giving a 404... hm...
Here is a small demo video:
This is the demo code:
https://github.com/thinktecture/blazor-webassembly-demo/tree/prerender
.cc @guardrex
dotnet/AspNetCore.Docs#20696