Docs

AuthenticateWith

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

authenticateWithRedirect()

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.

function authenticateWithRedirect(params: AuthenticateWithRedirectParams): Promise<void>;
  • Name
    redirectUrl (deprecated)
    Type
    string
    Description

    Full 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. signInFallbackRedirectUrl has priority over the legacy redirectUrl. Use fallbackRedirectUrl or forceRedirectUrl instead of redirectUrl.

  • Name
    redirectUrlComplete
    Type
    string
    Description

    Full URL or path to navigate after the OAuth or SAML flow completes.

  • Name
    continueSignUp
    Type
    boolean | undefined
    Description

    Whether to continue (i.e. PATCH) an existing SignUp (if present) or create a new SignUp.

  • Name
    strategy
    Type
    'oauth_<provider>' | 'saml'
    Description

    The strategy to use for authentication.
    The following strategies are supported:

    • oauth_<provider>: The user will be authenticated with their social sign-in account. See available OAuth providers.
    • saml: The user will be authenticated with SAML.

  • Name
    identifier
    Type
    string | undefined
    Description

    Identifier to use for targeting a SAML connection at sign-up.

  • Name
    emailAddress
    Type
    string | undefined
    Description

    Email 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.

function authenticateWithWeb3(params: AuthenticateWithWeb3Params): Promise<SignUpResource>;
  • Name
    identifier
    Type
    string
    Description

    The user's Web3 ID

  • Name
    generateSignature
    Type
    (opts: GenerateSignatureParams) => Promise<string>
    Description

    The method of how to generate the signature for the Web3 sign-in. See GenerateSignatureParams for more details.

  • Name
    identifier
    Type
    string
    Description

    The user's Web3 ID

  • Name
    nonce
    Type
    string
    Description

    The cryptographic nonce used in the sign-in.

authenticateWithWeb3() returns

TypeDescription
Promise<SignUpResource>A Promise which resolves to the current SignUp.

authenticateWithMetamask()

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

function authenticateWithMetamask(params?: SignUpAuthenticateWithMetamaskParams): Promise<SignUpResource>;
  • Name
    unsafeMetadata
    Type
    {[string]: any}
    Description

    Custom fields that will be attached to the User object post-signup.

authenticateWithMetamask() returns

TypeDescription
Promise<SignUpResource>A Promise which resolves to the current SignUp.

Feedback

What did you think of this content?