oidc-react icon indicating copy to clipboard operation
oidc-react copied to clipboard

Distinguish between "not logged in" and "OIDC service not available"

Open boldt opened this issue 3 years ago • 1 comments

Is there any was to distinguish between "not logged in" and "OIDC service not available"? When the OIDC service is not available, I see the following error in the console:

grafik

The user is not forwarded to the login page, and with the useAuth-hook, I can only determine whether a user is logged in or not. Is there any way to show an error, that the login service is not available?

boldt avatar Jan 24 '22 15:01 boldt

Thank you so much for posting this!

Sure enough, this is something we probably need to improve on. I'm not sure what errors oidc-client (the underlying package) throws in these cases, but there should, sure enough, be better than this. Have you tried an error boundary, just to catch the ones you have? I would love to hear about your findings. (Hadn't had time to check on this myself)

simenandre avatar Jul 15 '22 14:07 simenandre

Hey, it's been a while since we saw an update on this issue. @boldt, would you be interested in looking into ways we can improve on this in this library?

simenandre avatar Mar 01 '23 18:03 simenandre

Closing this as stale, let me know if you want to work on it, and I'll open it again! 👍

simenandre avatar May 18 '23 17:05 simenandre