How do I access the appState I set in loginWithRedirect in a React app?

Check out Auth0’s Complete Guide to React User Authentication.

In src/auth/auth0-provider-with-history.js, there’s an arrow function named onRedirectCallback, which accesses appState. Accessing appState in this callback function worked as I expected.

Hope this breadcrumb helps someone. I’ll add a more complete answer if I get the chance later. :wink:

5 Likes