Overview
Openfort provides embedded wallet infrastructure that enables seamless user authentication and wallet management with built-in Shield security. This guide shows you how to integrate Openfort signers with Rhinestone smart accounts to create a secure, cross-chain wallet experience. How it works: Openfort handles user authentication and embedded wallet creation with Shield security, providing wagmi-compatible clients. We use wagmi hooks to access these clients and pass them to Rhinestone’s SDK, which wraps them with cross-chain capabilities.Prerequisites
- An Openfort account
- Openfort publishable key
- Shield publishable key
- React application setup
Set Up Openfort Provider
First, set up the Openfort provider with wagmi and React Query in your React application:
Create Integration Hook
Create a production-ready hook that integrates Openfort wallets with Rhinestone accounts. This demonstrates the core pattern: get the wallet client from Openfort’s embedded wallet, then pass it to Rhinestone.
Openfort provides embedded wallets with Shield security that can be accessed via a viem-compatible provider.
Usage
Basic Component Integration
Use the enhanced hook in your React components with Openfort’s pre-built authentication UI:Cross-Chain Transactions
Send transactions using the Openfort-connected wallet with proper error handling:The Integration Pattern
All embedded signer integrations follow the same pattern:- Provider Setup: Configure the embedded wallet provider (Openfort, Dynamic, Privy, etc.)
- Get Wallet Client: Use the provider’s SDK to access the authenticated wallet and create a viem wallet client
- Pass to Rhinestone: Create a Rhinestone account using the wallet client as a signer
- Use Cross-Chain Features: The resulting account has all of Rhinestone’s capabilities
Authentication Methods
Openfort supports multiple authentication methods out of the box:- Email: Users can sign in with their email address
- Social: Google and other OAuth providers
- Guest: Anonymous authentication for quick onboarding
<OpenfortButton /> component automatically handles the authentication flow with all configured methods.
Shield Security
Openfort’s Shield provides additional security for embedded wallets:- Key Management: Secure key storage and recovery
- Transaction Protection: Advanced fraud detection
- Recovery Options: User-friendly account recovery flows
OpenfortProvider with the shieldPublishableKey.
Environment Variables
Make sure to set the following environment variables:Next Steps
- Learn more about Openfort’s embedded wallets
- Explore chain abstraction capabilities
- Check out creating an account for more details