Deprecated Higher-order components are not commonly used in modern React code, use Hooks instead
|Props of the component
|React Class based Component
React Higher Order Component with injected
React HOC that injects
signOut function into the class-based component props.
signOut function in the prop
to sign out and delete all the auth state
This will remove the authState from memory and also remove the stored data from cookie or localstorage
Here's a simple example:
For Now, this hook doesn't redirect automatically. So one needs to write the redirect logic himself.
AuthError - Thrown if the Hook is used outside the Provider Scope.
— 🔑 —
React Auth Kit is MIT License code