Use the useAuth0 hook in your components to access the auth state and methods.
It returns an Auth0ContextInterface, which carries the auth state
(isLoading, isAuthenticated, user, error), the login, logout and token
methods, and the four sub-clients:
mfa,
passkey,
myAccount and
anonymous. See that interface for
the full set of members.
TUser is an optional type param to provide a type to the user field.
Use the
useAuth0hook in your components to access the auth state and methods.It returns an Auth0ContextInterface, which carries the auth state (
isLoading,isAuthenticated,user,error), the login, logout and token methods, and the four sub-clients: mfa, passkey, myAccount and anonymous. See that interface for the full set of members.TUser is an optional type param to provide a type to the
userfield.