Skip to main content
Learn how to implement Sign in with Base using Wagmi by accessing the Base Account provider and following the proper SIWE (Sign-In With Ethereum) authentication flow.

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:
  1. Get the Base Account connector from Wagmi
  2. Access the underlying provider from the connector
  3. Use wallet_connect with signInWithEthereum capabilities
  4. Verify the signature on your backend
This follows the same flow as shown in the authenticate users guide, but integrates with Wagmi’s connector system.
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.