Next.js
useProviderLink()
API Documentation
Backend Services
- Authentication
- Storage
GraphQL
- AI
Client Libraries
- JavaScript
- React
- Next.js
- NhostClient
- <SignedIn />
- <SignedOut />
- createServerSideClient()
- getNhostSession()
- 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()
- Vue
- React Native
Next.js
useProviderLink()
Use the hook useProviderLink
to get an OAuth provider URL that can be used to sign in users.
const providerLink = useProviderLink()
Parameters
options optional ProviderOptions
Examples
const providerLink = useProviderLink()
import { useProviderLink } from '@nhost/react'
const Component = () => {
const { facebook, github } = useProviderLink()
return (
<div>
<a href={facebook}>Sign in with Facebook</a>
<a href={github}>Sign in with GitHub</a>
</div>
)
}
On this page