UseAuthClient
useAuthClient(
options?
):object
Defined in: use-auth-client.ts:63
React hook to set up the Internet Computer auth client
Parameters
Section titled “Parameters”options?
Section titled “options?”configuration for the hook
Returns
Section titled “Returns”actor:
undefined
|null
|ActorSubclass
actors
Section titled “actors”actors:
Record
<string
,ActorSubclass
>
authClient
Section titled “authClient”authClient:
null
|AuthClient
identity
Section titled “identity”identity:
null
|Identity
isAuthenticated
Section titled “isAuthenticated”isAuthenticated:
boolean
login()
Section titled “login()”login: () =>
Promise
<void
|InternetIdentityAuthResponseSuccess
>
Login through your configured identity provider Wraps the onSuccess and onError callbacks with promises for convenience
Returns
Section titled “Returns”Promise
<void
| InternetIdentityAuthResponseSuccess
>
Returns a promise that resolves to the response from the identity provider
logout()
Section titled “logout()”logout: () =>
Promise
<void
>
Returns
Section titled “Returns”Promise
<void
>