• React hook to set up the Internet Computer auth client

    Parameters

    Returns {
        actor: ActorSubclass;
        actors: Record<string, ActorSubclass>;
        authClient: AuthClient;
        identity: Identity;
        isAuthenticated: boolean;
        login: (() => Promise<InternetIdentityAuthResponseSuccess | void>);
        logout: (() => Promise<void>);
    }

    • actor: ActorSubclass
    • actors: Record<string, ActorSubclass>
    • authClient: AuthClient
    • identity: Identity
    • isAuthenticated: boolean
    • login: (() => Promise<InternetIdentityAuthResponseSuccess | void>)
        • (): Promise<InternetIdentityAuthResponseSuccess | void>
        • Login through your configured identity provider Wraps the onSuccess and onError callbacks with promises for convenience

          Returns Promise<InternetIdentityAuthResponseSuccess | void>

          • Returns a promise that resolves to the response from the identity provider
    • logout: (() => Promise<void>)
        • (): Promise<void>
        • Returns Promise<void>