React
useSignInEmailSecurityKey()
API Documentation
Backend Services
- Authentication
- Storage
GraphQL
- AI
Client Libraries
- JavaScript
- React
- NhostClient
- <SignedIn />
- <SignedOut />
- useAccessToken()
- useAddSecurityKey()
- useAuthenticated()
- useAuthenticationStatus()
- useChangeEmail()
- useChangePassword()
- useConfigMfa()
- useDecodedAccessToken()
- useFileUpload()
- useFileUploadItem()
- useHasuraClaim()
- useHasuraClaims()
- useMultipleFilesUpload()
- useNhostClient()
- useProviderLink()
- useResetPassword()
- useSendVerificationEmail()
- useSignInAnonymous()
- useSignInEmailPassword()
- useSignInEmailPasswordless()
- useSignInEmailSecurityKey()
- useSignInPAT()
- useSignInSmsPasswordless()
- useSignOut()
- useSignUpEmailPassword()
- useSignUpEmailSecurityKeyEmail()
- useElevateSecurityKeyEmail()
- useUserAvatarUrl()
- useUserData()
- useUserDefaultRole()
- useUserDisplayName()
- useUserEmail()
- useUserId()
- useUserIsAnonymous()
- useUserLocale()
- useUserRoles()
- Next.js
- Vue
- React Native
React
useSignInEmailSecurityKey()
Use the hook useSignInEmailSecurityKey
to sign in a user using their email and a security key using the WebAuthn API.
const {
signInEmailSecurityKey,
needsEmailVerification,
isLoading,
isSuccess,
isError,
error
} = useSignInEmailSecurityKey()
console.log({ needsEmailVerification, isLoading, isSuccess, isError, error })
const handleFormSubmit = async (e) => {
e.preventDefault()
await signInEmailSecurityKey('joe@example.com')
}