init
This commit is contained in:
commit
d282e2bcae
3481 files changed
+568488
No files matched your search
+27
@@ -0,0 +1,27 @@
|
||||
import { User } from '@auth0/auth0-spa-js';
|
||||
import { Auth0ContextInterface } from './auth0-context';
|
||||
/**
|
||||
* ```js
|
||||
* const {
|
||||
* // Auth state:
|
||||
* error,
|
||||
* isAuthenticated,
|
||||
* isLoading,
|
||||
* user,
|
||||
* // Auth methods:
|
||||
* getAccessTokenSilently,
|
||||
* getAccessTokenWithPopup,
|
||||
* getIdTokenClaims,
|
||||
* loginWithRedirect,
|
||||
* loginWithPopup,
|
||||
* logout,
|
||||
* } = useAuth0<TUser>();
|
||||
* ```
|
||||
*
|
||||
* Use the `useAuth0` hook in your components to access the auth state and methods.
|
||||
*
|
||||
* TUser is an optional type param to provide a type to the `user` field.
|
||||
*/
|
||||
declare const useAuth0: <TUser extends User = User>(context?: import("react").Context<Auth0ContextInterface<User>>) => Auth0ContextInterface<TUser>;
|
||||
export default useAuth0;
|
||||
//# sourceMappingURL=use-auth0.d.ts.map
|
||||
Reference in new issue
Block a user