Allow users to authenticate with external wallets like MetaMask, Phantom, or WalletConnect in your React app.
Prerequisite:
If you haven’t already, check out the External Wallets Overview first, this guide builds on the concepts introduced there.
TurnkeyProvider
configuration. Wallet authentication can also be set in the dashboard, but the TurnkeyProvider
configuration takes precedence. You can further customize settings, such as which chains are enabled, which providers are supported, and whether WalletConnect is allowed.
Note:
- For authentication to work, you must define at least one
ethereum
orsolana
chain, either asnative
or withwalletConnectNamespaces
.
- To enable WalletConnect, you must configure both the
walletConnect
object and definewalletConnectNamespaces
in at least one chain (e.g.,ethereum
orsolana
).
Auth
modal. It handles the entire authentication flow for you.
Note: this UI is customizable. Checkout the UI Customization guide to learn how to customize the look and feel of the Auth modal and other UI components.
loginWithWallet()
signUpWithWallet()
loginOrSignUpWithWallet()
loginOrSignUpWithWallet()
as the reference, since it’s the most commonly used approach.
Get the WalletProvider you want to use
Log in or sign up with that wallet
stampLogin()
. This involves signing the login payload with the same wallet key pair.