Skip to Content
Clerk logo

Clerk Docs

Ctrl + K
Go to clerk.com

AuthenticateWith

These are all methods on the SignUp class that allow you to authenticate with different methods.

authenticateWithRedirect()

function authenticateWithRedirect(params: AuthenticateWithRedirectParams): Promise<void>;

Signs up users via OAuth, where an external account provider is used to verify the user's identity and provide certain information about the user.

AuthenticateWithRedirectParams

NameTypeDescription
redirectUrlstringFull URL or path to the route that will complete the OAuth or SAML flow. Typically, this will be a simple /sso-callback route that calls Clerk.handleRedirectCallback or mounts the <AuthenticateWithRedirectCallback /> component.
redirectUrlCompletestringFull URL or path to navigate after the OAuth or SAML flow completes.
continueSignUpboolean | undefinedWhether to continue (i.e. PATCH) an existing SignUp (if present) or create a new SignUp.
strategy'oauth_<provider>' | 'saml'The strategy to use for authentication.
The following strategies are supported:
  • oauth_<provider>: The user will be authenticated with their Social login account. See available OAuth Strategies.
  • saml: The user will be authenticated with SAML.
identifierstring | undefinedIdentifier to use for targeting a SAML connection at sign-up.
emailAddressstring | undefinedEmail address to use for targeting a SAML connection at sign-up.

authenticateWithWeb3()

Starts a sign up flow that authenticates the user against their public wallet address.

AuthenticateWithWeb3Params

NameTypeDescription
identifierstringThe 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
NameTypeDescription
identifierstringThe user's Web3 ID
noncestringThe cryptographic nonce used in the sign-in.

authenticateWithMetamask()

function authenticateWithMetamask(params?: SignUpAuthenticateWithMetamaskParams): Promise<SignUp>;

Starts a sign up flow that uses the Metamask browser extension to authenticate the user using their public wallet address.

SignUpAuthenticateWithMetamaskParams

NameTypeDescription
unsafeMetadata{[string]: any}Custom fields that will be attached to the User object post-signup.

Last updated on October 5, 2023

What did you think of this content?

Clerk © 2023