Auth0Provider
component. This will provide the React Context to components that are placed inside your application.
isLoading
and error
states.
loginWithRedirect
or loginWithPopup
to log your users in.
logout
to log your users out. Make sure returnTo
is specified in “Allowed Logout URLs” in your .
user
value.
withAuth0
Higher Order Component to add the auth0
property to class components instead of using the hook.
withAuthenticationRequired
higher order component. Visits to this route when unauthenticated will redirect the user to the login page and back to this page after login.
Auth0Provider
with a custom onRedirectCallback
method to perform the action that returns the user to the protected page. See examples for react-router, Gatsby and Next.js.
audience
and scope
of your access token, either in Auth0Provider
or getAccessTokenSilently
. Then use it to call a protected API by passing it in the Authorization
header of your request.