Blazor Server-Side Rendering CORS issue with Microsoft.Identity.Web & Azure B2C #49814
Closed
1 task done
Labels
area-blazor
Includes: Blazor, Razor Components
bug
This issue describes a behavior which is not expected - a bug.
Milestone
Uh oh!
There was an error while loading. Please reload this page.
Is there an existing issue for this?
Describe the bug
I'm trying to use user-flows with Azure AD B2C using a Blazor Server-Side rendered application with interactive components (
.AddServerComponents()
) and I'm seeing the following error when clicking onSign In
,Sign Out
,Edit Profile
, etc.. My guess is that this goes for normal Azure AD authentication too but I haven't tested that.The keyword here is
fetch
, because interactivity comes from theblazor.web.js
script that is added as part of interactivity. This turns clicks into HTTP verbFETCH
and this is not allowed to do.I can get this working by simply removing the script file but that is obviously unwanted. I can also get it to work by utilizing
RenderModeWebAssembly
but I'm not sure as to the obviousness of this design for others.Expected Behavior
I expect to be redirected to the Azure AD portal to sign in, logout, etc. with a Blazor SSR app w/ interactive components.
Steps To Reproduce
These steps in a repo -> https://github.com/benjaminsampica/AzureB2CIssues
dotnet new blazor
appsettings.json
Index.razor
Exceptions (if any)
No response
.NET Version
.NET 8 preview 6
Anything else?
No response
The text was updated successfully, but these errors were encountered: