React
useLinkIdToken()
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()
- useSignInEmailOTP()
- useSignInIdToken()
- useLinkIdToken()
- Next.js
- Vue
- React Native
React
useLinkIdToken()
Use the hook useLinkIdToken
to link a user account with the provider’s account using an id token
const { linkIdToken, isLoading, isSuccess, isError, error } = useLinkIdToken()
const handleFormSubmit = async (e) => {
e.preventDefault()
await linkIdToken({
provider: 'google',
idToken: '...',
nonce: '...'
})
}