oidc-client
oidc-client copied to clipboard
Howto catch error without using logger ?
Hello Everyone, thank for this good lib...very useful :) I have read almost all the documentation and some source code and i don't find information about error catching. The only way to handle error is passing by ErrorLog:
<AuthenticationProvider configuration={oidcConfiguration} loggerLevel={oidcLog.ERROR} logger={authLogger}>
.....
I want to show network error in the page (through snackbar component). Is possible through logger but it's seems to be not natural way ? Is-it possible for example to catch network error ?
For example if i put wrong url authority server i get this error:
Thanks :)
We're getting the same error. Our Authentication Server is only accessible through a VPN, if the user is not connected to the VPN he'll get the Network Error message as well.
In v4 login function is a promise.
You can also subcrise to all internal events in order to get error. Do you still need this? I will detail it in v4 the readme very soon.