Skip to content
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

Provide failure details when token refresh fails in Blazor WebAssembly #60117

Open
danroth27 opened this issue Jan 30, 2025 · 0 comments
Open
Labels
area-blazor Includes: Blazor, Razor Components
Milestone

Comments

@danroth27
Copy link
Member

danroth27 commented Jan 30, 2025

Originally posted by @ascott18:

#40764 (comment)

When the token refresh fails, the only thing propagated from JS back to C# is "RequiresRedirect" (link). We cannot get any details of the failure, like the OAuth response object from the server (with error and error_description properties), or if the failure was a network error (i.e. "no internet").

There doesn't seem to be a good place to configure a global handler for token refresh failures. The best I've managed was subclassing RemoteAuthenticationService and overriding RequestAccessToken, but this circles back to the first point where in the event of a failure in token acquisition, we cannot determine what the failure mode was. Example use case: token refresh fails because the user's account was disabled on the server. We want to immediately kick the user out of the app no matter what they were doing at the time.

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-blazor Includes: Blazor, Razor Components label Jan 30, 2025
@javiercn javiercn added this to the Backlog milestone Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-blazor Includes: Blazor, Razor Components
Projects
None yet
Development

No branches or pull requests

2 participants