Blazor oidc doesn't return meaningfull error messages #55791
Labels
area-blazor
Includes: Blazor, Razor Components
enhancement
This issue represents an ask for new feature or an enhancement to an existing one
feature-oidc
Milestone
Is there an existing issue for this?
Describe the bug
I use blazor with openid connect authentication.
I follow microsoft documentation and create an authentication page:
If any error happens the authentication page displays general message without details:
"There was an error signing in."
I assume, there should be a way to get error details.
Namely, there should be a way to get error and error_description of oidc spec.
Expected Behavior
The authentication page should display error and error_description fields
Steps To Reproduce
Any blazor app that utilizes oidc authentication and utilize the authentication page will show the same behaviour.
Exceptions (if any)
No response
.NET Version
No response
Anything else?
I digged into asp.net core source to find the problem source.
The problem is in this file:
https://github.com/dotnet/aspnetcore/blob/main/src/Components/WebAssembly/WebAssembly.Authentication/src/Interop/AuthenticationService.ts
Specifically in the completeSignIn function (line 258):
You should just adjust the line "return this.error('There was an error signing in.');" to return error details
The text was updated successfully, but these errors were encountered: