0.37.2 • Published 6 months ago
@8base/react-auth v0.37.2
8base Auth
The 8base React Auth package contains a provider with authentication state and auth helpers.
AuthProvider
Table of Contents
AuthProvider
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.
Usage
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`,
logoutRedirectUri: `${window.location.origin}/auth`,
workspaceId: 'workspace-id',
});
<AuthProvider authClient={ authClient }>
...
<AuthContext.Consumer>
{
(auth: AuthContextProps) => (<div />)
}
</AuthContext.Consumer>
...
</AuthProvider>
3.1.0-beta.0
6 months ago
3.0.0-beta.1
1 year ago
3.0.0-beta.3
1 year ago
3.0.0-beta.0
2 years ago
0.37.2
5 years ago
0.37.1
5 years ago
0.37.0
5 years ago
0.36.6
5 years ago
0.36.5
5 years ago
0.36.4
5 years ago
0.36.3
5 years ago
0.36.2
5 years ago
0.36.1
5 years ago
0.36.0
5 years ago
0.35.1
5 years ago