Prerequisites
Make sure you have set up Wagmi with Base Account before following this guide.Overview
To implement Sign in with Base with Wagmi, you need to:- Get the Base Account connector from Wagmi
- Access the underlying provider from the connector
- Use
wallet_connect
withsignInWithEthereum
capabilities - Verify the signature on your backend
To get access to the latest version of the Base Account SDK within Wagmi, you can use the following command to override it:Or you can use a specific version by adding the version to the overrides:Make sure to delete your
node_modules
and package-lock.json
and run a new install to ensure the overrides are applied.Implementation
Code Snippets
3. Using the Pre-built Button Component
You can also use the official Sign In With Base button component:Please Follow the Brand GuidelinesIf you intend on using the
SignInWithBaseButton
, please follow the Brand Guidelines to ensure consistency across your application.