The 8base React Auth package contains a provider with authentication state and auth helpers.
npm install @8base-react/authThe 8base React Auth package contains a provider with authentication state and auth helpers.
#### Table of Contents
- AuthProvider
- Parameters
- Properties
Extends React.Component
Provides access to the authentication state.
#### Parameters
- props AuthProviderProps
#### Properties
- children React$Node Children of the provider.
- authClient AuthClient Instance of the auth client.
``js
import { AuthContext, AuthProvider, type AuthContextProps } from '@8base/react-auth';
import { WebAuth0AuthClient } form '@8base/web-auth0-auth-client';
const authClient = new WebAuth0AuthClient({
domain: 'domain',
clientId: 'client-id',
redirectUri: ${window.location.origin}/auth/callback,${window.location.origin}/auth
logoutRedirectUri: ,
workspaceId: 'workspace-id',
});
...
{
(auth: AuthContextProps) => ()
}
...
``