Skip to main content
Install auth-kit and its peer dependency viem.
Note: auth-kit is a React library. If you’re using a different framework, take a look at the client library instead.

1. Import the libraries

Import auth-kit and CSS styles.

2. Configure your provider

Configure a provider with an Optimism RPC URL, your app’s domain and login URL, and wrap your application in it.

3. Add a connect button

Render the SignInButton component. When the user clicks this button, they will be prompted to complete sign in using their Farcaster wallet application.

4. Read user profile

Optionally, fetch details about the logged in user anywhere in your app with useProfile.