Skip to content

Prerendering Blazor WASM .NET 5 app with authentication throws error #28025

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ChristianWeyer opened this issue Nov 20, 2020 · 6 comments
Closed
Assignees
Labels
affected-medium This issue impacts approximately half of our customers area-blazor Includes: Blazor, Razor Components enhancement This issue represents an ask for new feature or an enhancement to an existing one feature-blazor-wasm This issue is related to and / or impacts Blazor WebAssembly feature-blazor-wasm-auth feature-prerendering Issues related to prerendering blazor components ✔️ Resolution: Duplicate Resolved as a duplicate of another issue Priority:2 Work that is important, but not critical for the release severity-blocking This label is used by an internal tool Status: Resolved

Comments

@ChristianWeyer
Copy link

ChristianWeyer commented Nov 20, 2020

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...

image

Here is a small demo video:

BlazorDemo

This is the demo code:
https://github.com/thinktecture/blazor-webassembly-demo/tree/prerender

.cc @guardrex
dotnet/AspNetCore.Docs#20696

@guardrex
Copy link
Contributor

guardrex commented Nov 20, 2020

I'll update the <app> to <div id="app"> on dotnet/AspNetCore.Docs#20698 and dotnet/AspNetCore.Docs#20737 PRs and then followup later with a new PR for anything else that we need to do for this scenario in 5.0 docs.

@javiercn javiercn added area-blazor Includes: Blazor, Razor Components feature-blazor-wasm This issue is related to and / or impacts Blazor WebAssembly labels Nov 20, 2020
@mkArtakMSFT mkArtakMSFT added this to the Next sprint planning milestone Nov 23, 2020
@ghost
Copy link

ghost commented Nov 23, 2020

Thanks for contacting us.
We're moving this issue to the Next sprint planning milestone for future evaluation / consideration. We will evaluate the request when we are planning the work for the next milestone. To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.

@SteveSandersonMS SteveSandersonMS added affected-medium This issue impacts approximately half of our customers bug This issue describes a behavior which is not expected - a bug. severity-blocking This label is used by an internal tool labels Jan 26, 2021 — with ASP.NET Core Issue Ranking
@ghost
Copy link

ghost commented Mar 19, 2021

Thanks for contacting us.
We're moving this issue to the Next sprint planning milestone for future evaluation / consideration. We will evaluate the request when we are planning the work for the next milestone. To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.

@javiercn javiercn added feature-blazor-wasm-auth feature-prerendering Issues related to prerendering blazor components labels Apr 20, 2021
@SteveSandersonMS SteveSandersonMS added enhancement This issue represents an ask for new feature or an enhancement to an existing one and removed bug This issue describes a behavior which is not expected - a bug. labels Aug 3, 2021
@ghost
Copy link

ghost commented Aug 3, 2021

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

@SteveSandersonMS
Copy link
Member

We're keen to do something useful for this in 7.0 but it's too late to address in 6.0 now we're in the RC phase unfortunately.

@mkArtakMSFT mkArtakMSFT added triaged Priority:1 Work that is critical for the release, but we could probably ship without labels Nov 16, 2021
@mkArtakMSFT mkArtakMSFT modified the milestones: Backlog, .NET 7 Planning Nov 16, 2021
@mkArtakMSFT mkArtakMSFT added Priority:2 Work that is important, but not critical for the release and removed Priority:1 Work that is critical for the release, but we could probably ship without labels Nov 23, 2021
@mkArtakMSFT
Copy link
Contributor

Closing this in favor of #27592 as a dupe

@mkArtakMSFT mkArtakMSFT added the ✔️ Resolution: Duplicate Resolved as a duplicate of another issue label Dec 8, 2021
@ghost ghost added the Status: Resolved label Dec 8, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Jan 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affected-medium This issue impacts approximately half of our customers area-blazor Includes: Blazor, Razor Components enhancement This issue represents an ask for new feature or an enhancement to an existing one feature-blazor-wasm This issue is related to and / or impacts Blazor WebAssembly feature-blazor-wasm-auth feature-prerendering Issues related to prerendering blazor components ✔️ Resolution: Duplicate Resolved as a duplicate of another issue Priority:2 Work that is important, but not critical for the release severity-blocking This label is used by an internal tool Status: Resolved
Projects
None yet
Development

No branches or pull requests

5 participants