inAppWallet
Creates an app scoped wallet for users based on various authentication methods. Full list of available authentication methods here.
Can also be configured to use Account Abstraction to directly connect to a ERC4337 smart account based on those authentication methods.
View all available social auth methods
With the executionMode
option, you can enable smart accounts and sponsor gas for your users.
Using EIP-7702 (recommended):
On chains with EIP-7702 enabled, you can upgrade the inapp wallet to a smart account, keeping the same address and performance as the regular EOA.
Using EIP-4337:
On chains without EIP-7702 enabled, you can still use smart accounts using EIP-4337, this will return a different address (the smart contract address) than the regular EOA.
To login with email, you can use the preAuthenticate
function to first send a verification code to the user's email, then login with the verification code.
Similar to email, you can login with a phone number by first sending a verification code to the user's phone number, then login with the verification code.
You can also login to the in-app wallet with another existing wallet by signing a standard Sign in with Ethereum (SIWE) message.
You can also login with a passkey. This mode requires specifying whether it should create a new passkey, or sign in with an existing passkey. We recommend checking if the user has a passkey stored in their browser to automatically login with it.
You can also connect to a guest account, this will create a new account for the user instantly and store it in the browser's local storage.
You can later "upgrade" this account by linking another auth method, like email or phone for example. This will preserve the account's address and history.
For usage in backends, you can create wallets with the backend
strategy and a stable walletSecret.
Make sure to keep that walletSecret safe as it is the key to access that wallet, never expose it to the client.
You can use any OIDC provider to authenticate your users. Make sure to configure it in your dashboard under in-app wallet settings.
You can also use your own endpoint to authenticate your users. Make sure to configure it in your dashboard under in-app wallet settings.
You can specify a logo, icon and name for your login page to customize how in-app wallets are displayed in the Connect UI components (ConnectButton and ConnectEmbed).
By default, the Connect Modal will show a button to export the private key of the wallet. You can hide this button by setting the hidePrivateKeyExport
option to true
.
By default, the Oauth window will open in a popup window. You can change this behavior by setting the auth.mode
option to "redirect"
.
By default, wallet state is stored in the browser's local storage if in the browser, or in-memory storage if not in the browser. You can override this behavior by providing a custom storage object, useful for server side and CLI integrations.