AuthorizationMessageHandler should pass through the exception message #51666
Unanswered
blanchardglen
asked this question in
Ideas
Replies: 0 comments
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
-
It would be great if the
AuthorizationMessageHandler.SendAsync
when it threw aAccessTokenNotAvailableException
:aspnetcore/src/Components/WebAssembly/WebAssembly.Authentication/src/Services/AuthorizationMessageHandler.cs
Line 72 in ffa0a02
if it included the message from the auth server or exception as to why. e.g.
login_required
,timeout
,no_network
etc.This will require changes to
AuthenticationService.ts
to pass the message from the exception:aspnetcore/src/Components/WebAssembly/WebAssembly.Authentication/src/Interop/AuthenticationService.ts
Line 190 in ffa0a02
To the
AccessTokenResult
:aspnetcore/src/Components/WebAssembly/WebAssembly.Authentication/src/Services/RemoteAuthenticationService.cs
Line 178 in ffa0a02
This would greatly help especially for offline/occasionally connected apps where asking for the latest data from the server is good but not critical.
Right now the only options are:
This is messy as it requires a new custom request, config for which auth server it is and likely a cors enabled url to test against.
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions