Skip to main content

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
1

Install Dependencies

Install the required dependencies:
2

Set Up Openfort Provider

First, set up the Openfort provider with wagmi and React Query in your React application:
3

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:
  1. Provider Setup: Configure the embedded wallet provider (Openfort, Dynamic, Privy, etc.)
  2. Get Wallet Client: Use the provider’s SDK to access the authenticated wallet and create a viem wallet client
  3. Pass to Rhinestone: Create a Rhinestone account using the wallet client as a signer
  4. Use Cross-Chain Features: The resulting account has all of Rhinestone’s capabilities
This pattern means you can easily switch between providers or support multiple providers in the same app.

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
The <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
Configure Shield in your OpenfortProvider with the shieldPublishableKey.

Environment Variables

Make sure to set the following environment variables:

Next Steps