UNPKG

@nhost/react

Version:

Nhost React library

32 lines (31 loc) 1.04 kB
import { SignInSecurityKeyHandlerResult, SignInSecurityKeyState } from '@nhost/nhost-js'; interface SignInSecurityKeyHandler { (): Promise<SignInSecurityKeyHandlerResult>; } export interface SignInSecurityKeyHookResult extends SignInSecurityKeyState { signInSecurityKey: SignInSecurityKeyHandler; } interface SignInSecurityKeyHook { (): SignInSecurityKeyHookResult; } /** * Use the hook `useSignInSecurityKey` to sign in a user with a security key using the WebAuthn API. * * @example * ```tsx * const { signInSecurityKey, needsEmailVerification, isLoading, isSuccess, isError, error } = useSignInSecurityKey() * * console.log({ needsEmailVerification, isLoading, isSuccess, isError, error }); * * const handleFormSubmit = async (e) => { * e.preventDefault(); * * await signInSecurityKey() * } * ``` * * @docs https://docs.nhost.io/reference/react/use-sign-in-security-key */ export declare const useSignInSecurityKey: SignInSecurityKeyHook; export {}; //# sourceMappingURL=useSignInSecurityKey.d.ts.map