Replies: 2 comments 1 reply
-
@oliverw Did you find a solution since? |
Beta Was this translation helpful? Give feedback.
1 reply
-
Same problem here. |
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.
Uh oh!
There was an error while loading. Please reload this page.
-
I have implemented Azure AD B2C authentication in a .NET 8 "Blazor Web App" (the new hybrid-islands template). The default should be to require authentication for everything except Blazor Pages (not Razor Pages) whitelisted using:
@attribute [AllowAnonymous]
(I don't have@attribute [Authorize]
in _Imports.razor). Global auth is enforced through theFallbackPolicy
(see below).Contrary to my experiments with Blazor Server in .NET 7. This actually works - kind of. The home page is indeed accessible as anonymous user, BUT all all CSS styles and Javascript is missing. I believe this is because according to my own debugging observations, even requests to static resource go through the
DenyAnonymousAuthorizationRequirement
handler added by theFallbackPolicy
. Which flat out denies those requests if the user is authenticated. I have no real idea how to fix this or what the recommended approach is.Program.cs:
Home.razor:
Beta Was this translation helpful? Give feedback.
All reactions