AuthenticateWith
These are all methods on the SignIn
class that allow you to authenticate with different methods.
Methods
authenticateWithRedirect()
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
strategy
- Type
OAuthStrategy | 'saml'
- Description
The strategy corresponding to the OAuth provider. For example:
oauth_facebook
,oauth_github
, etc.
- Name
redirectUrl
- Type
string
- Description
The URL that the OAuth provider should redirect to, on successful authorization on their part.
- Name
redirectUrlComplete
- Type
string
- Description
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. |
authenticateWithMetamask()
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()
Starts a sign in flow that authenticates the user against their public wallet address.
AuthenticateWithWeb3Params
- 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.
GenerateSignatureParams
- Name
identifier
- Type
string
- Description
The user's Web3 ID.
- Name
nonce
- Type
string
- Description
The cryptographic nonce used in the sign-in.
Feedback
Last updated on