Template Repository
Explore the template repository for integrating Wagmi with Okto.
A comprehensive walkthrough of the Okto Template App designed for seamless Wagmi integration. This template demonstrates core Okto functionality—including authentication, wallet management, and blockchain interactions—so you can quickly get started building with Okto and Wagmi.
Customize Before Production
Please note that this template is for development and testing purposes only. Be sure to customize and secure it before using in production.
Getting Started
For detailed installation instructions, follow the steps given below:
- Clone the repository:
git clone https://github.com/okto-hq/okto-sdkv2-external-adapter-template.git
- Navigate into the project directory:
cd okto-sdkv2-external-adapter-template
- Switch to the
bmac-react-wagmi-okto
branch (this is where the project files are located) and install dependencies:
git checkout bmac-react-wagmi-okto
npm install
Why switch branches?
main
) is empty. All the source code and configuration files are located in the bmac-react-wagmi-okto
branch. Be sure to check out this branch before proceeding. - Set up environment variables:
cp .env.sample .env
- Add your API keys to the
.env
file:
VITE_OKTO_ENVIRONMENT="sandbox" or "production"
VITE_OKTO_CLIENT_PRIVATE_KEY="YOUR_CLIENT_PRIVATE_KEY"
VITE_OKTO_CLIENT_SWA="YOUR_CLIENT_SWA"
VITE_GOOGLE_CLIENT_ID="YOUR_GOOGLE_CLIENT_ID"
Note
To obtain these credentials:
-
Client Private Key & SWA: Get these from the Okto Dashboard. These keys are essential for authenticating your requests with Okto's services.
-
Google OAuth Credentials: Required for Google Sign-In functionality
- Set up a project in Google Cloud Console
- Create OAuth 2.0 credentials
- Follow our Google Console Setup Guide for detailed instructions
- Start the development server:
npm run dev
Integrating with wagmi
A step-by-step guide to integrating the Okto-Wagmi adapter into Wagmi-based dApps, enabling smooth wallet connectivity and streamlined user onboarding.
Integrating with Rainbowkit
A step-by-step guide to integrating the Okto-Rainbowkit adapter into Rainbowkit-based dApps, enabling smooth wallet connectivity and streamlined user onboarding.