Authenticate with
These are all methods on the SignIn
class that allow you to authenticate with different methods.
Methods
authenticateWithRedirect()
function authenticateWithRedirect(params: AuthenticateWithRedirectParams): Promise<void>;
Signs in users via OAuth. This is commonly known as Single Sign On (SSO), where an external account is used for verifying the user's identity.
AuthenticateWithRedirectParams
Name | Type | Description |
---|
strategy | string | The OAuth provider that will be used for singing in. Must be one of the supported OAuthStrategy . |
redirectUrl | string | The URL that the OAuth provider should redirect to, on successful authorization on their part. |
redirectUrlComplete | string | The URL that the user will be redirected to, after successful authorization from the OAuth provider and Clerk sign in |
Returns
Type | Description |
---|
Promise<void> | This method returns a Promise which doesn't resolve to any value. |
function authenticateWithMetamask(): Promise<SignInResource>;
Starts a sign in flow that uses the Metamask browser extension to authenticate the user using their public wallet address.
Returns
Type | Description |
---|
Promise<SignInResource> | This method returns a Promise which resolves to the current SignIn . |
authenticateWithWeb3()
function authenticateWithWeb3(params: AuthenticateWithWeb3Params): Promise<SignInResource>;
Starts a sign in flow that authenticates the user against their public wallet address.
AuthenticateWithWeb3Params
Name | Type | Description |
---|
identifier | string | The user's Web3 ID |
generateSignature | (opts: GenerateSignatureParams) => Promise<string> | The method of how to generate the signature for the Web3 sign-in. See GenerateSignatureParams for more details. |
GenerateSignatureParams
Name | Type | Description |
---|
identifier | string | The user's Web3 ID |
nonce | string | The crypographic nonce used in the sign-in. |
Types
OAuthStrategy
type OAuthStrategy = |
"oauth_facebook"|
"oauth_github"|
"oauth_google"|
"oauth_hubspot"|
"oauth_tiktok"|
"oauth_gitlab"|
"oauth_discord"|
"oauth_twitter"|
"oauth_twitch"|
"oauth_linkedin"|
"oauth_dropbox"|
"oauth_bitbucket"|
"oauth_microsoft"|
"oauth_notion";
The OAuth provider that will be used for singing in. Must be one of the supported OAuthStrategy.
Name | Type | Description |
---|
oauth_facebook | string | Specify Facebook as the verification OAuth provider. |
oauth_github | string | Specify Github as the verification OAuth provider. |
oauth_google | string | Specify Google as the verification OAuth provider. |
oauth_hubspot | string | Specify HubSpot as the verification OAuth provider. |
oauth_tiktok | string | Specify TikTok as the verification OAuth provider. |
oauth_gitlab | string | Specify GitLab as the verification OAuth provider. |
oauth_discord | string | Specify Discord as the verification OAuth provider. |
oauth_twitter | string | Specify Twitter as the verification OAuth provider. |
oauth_twitch | string | Specify Twitch as the verification OAuth provider. |
oauth_linkedin | string | Specify LinkedIn as the verification OAuth provider. |
oauth_dropbox | string | Specify Dropbox as the verification OAuth provider. |
oauth_bitbucket | string | Specify Bitbucket as the verification OAuth provider. |
oauth_microsoft | string | Specify Microsoft as the verification OAuth provider. |
oauth_notion | string | Specify Notion as the verification OAuth provider. |