Detecting if there is an Auth0 outage using useAuth0 from @auth0/auth0-react

Hello! Recently, there was an Auth0 outage that caused my app to refresh infinitely. I suspect that’s because the app is protected entirely using withAuthenticationRequired. I wrap the app in Auth0Provider, and am wondering if the error variable returned from useAuth0 could be used at the topmost component of the app (not rendered by withAuthenticationRequired) to detect when calls to auth0 are working. Specifically server errors. If so, is there an error message that I should be looking for? Or could simply checking if the error object exists be sufficient enough?

Below would be the general structure of the app:

<Auth0Provider …config>

And then App.tsx would have these routes (using react-router-dom):

I’d want to use useAuth0 in App.tsx and check if there are any errors with Auth0 (mainly server outage) and render a maintenance page instead of redirecting users to the Auth0 login page for authentication.

Thanks in advance!

Not sure why the structure of the app got cut out.

<Auth0Provider …config>

App:

Hi @janet-yu,

Welcome to the Auth0 Community!

You can head over to https://status.auth0.com/ to check the status of Auth0. If you scroll down you should be able to subscribe to a feed of your choice, Atom or RSS. Use it in your application as a health check.

If you have any other questions feel free to reach out.

Have a good one,
Vlad