-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Closed as not planned
Closed as not planned
Copy link
Labels
area-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor Componentsfeature-blazor-wasmThis issue is related to and / or impacts Blazor WebAssemblyThis issue is related to and / or impacts Blazor WebAssemblyfeature-blazor-wasm-auth
Milestone
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
Blazor WASM AADB2C template's fetchdata will fail after enter credentials. The error shows 401 Unauthorized in the console. Look at the requests. ID token and Access token were received with correct scp. The response header shows www-authenticate: Bearer error="invalid_token", error_description="The issuer '(null)' is invalid". However the issuer is present in the request and not null.
One thing I did observe, in the documentation
it shows: "iss": "https://mysiteb2c.b2clogin.com/5cc15ea8-a296-4aa3-97e4-226dcc9ad298/v2.0/",
however, the one I received in the id token is like:
"iss": "https://mysiteb2c.b2clogin.com/tfp/[guid]/b2c_1_signin_signup/v2.0/",
Expected Behavior
Able to access the data requested
Steps To Reproduce
- follow instructions from https://docs.microsoft.com/en-us/aspnet/core/blazor/security/webassembly/hosted-with-azure-active-directory-b2c?view=aspnetcore-6.0
- run the app
- click on Fetch Data
- enter credentials
- call will fail. inspect to see that it received 401 unauthorized. on network tab, it shows received both id token and access token. look at the request it shows response header: www-authenticate: Bearer error="invalid_token", error_description="The issuer '(null)' is invalid"
Exceptions (if any)
No response
.NET Version
6.0.0
Anything else?
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor Componentsfeature-blazor-wasmThis issue is related to and / or impacts Blazor WebAssemblyThis issue is related to and / or impacts Blazor WebAssemblyfeature-blazor-wasm-auth