🔐 Web3Auth Dashboard Setup
This guide walks you through setting up Web3Auth for XRP Genie projects.
🎯 Overview
Web3Auth provides social login and account abstraction for XRPL wallets. You’ll need to configure:
- Web3Auth Infrastructure: Sapphire Devnet vs Mainnet
- XRPL Network: Testnet vs Mainnet blockchain
- Domain Settings: Allowed origins for your app
📋 Prerequisites
- A Web3Auth account
- Understanding of development vs production environments
🚀 Step 1: Create Web3Auth Account
- Go to Web3Auth Dashboard
- Click “Sign Up” or “Login”
- Choose your preferred authentication method
- Verify your email if required
🏗️ Step 2: Create New Project
- Click “Create Project” or ”+ New Project”
- Enter project details:
- Project Name:
My XRP Genie App
- Environment: Choose based on your needs:
- Sapphire Devnet: For development and testing
- Sapphire Mainnet: For production applications
- Project Name:
⚙️ Step 3: Configure XRPL Integration
- In your project dashboard, go to “Blockchain” or “Networks”
- Enable XRPL (XRP Ledger)
- Configure network settings:
- Testnet: For development with free XRP
- Mainnet: For production with real XRP
🌐 Step 4: Set Allowed Origins
Critical for avoiding “Failed to fetch project configurations” error:
- Go to “Settings” → “Allowed Origins”
-
Add your domains:
For Development:
http://localhost:3000 http://127.0.0.1:3000
For Production:
https://yourdomain.com https://www.yourdomain.com
🔑 Step 5: Get Client ID
- In your project dashboard, find “Client ID”
- Copy the client ID (looks like:
BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ
) - Important: Keep this safe but note it’s safe to expose publicly
🛠️ Step 6: Configure XRP Genie
When running the CLI, select:
For Sapphire Devnet projects:
- Web3Auth Infrastructure: Sapphire Devnet
- XRPL Network: Testnet (recommended for development)
For Sapphire Mainnet projects:
- Web3Auth Infrastructure: Sapphire Mainnet
- XRPL Network: Mainnet (production only)
📝 Step 7: Update Client ID
In your generated project, update the client ID:
// hooks/useWeb3AuthWallet.ts
const web3auth = new Web3Auth({
clientId: "YOUR_CLIENT_ID_HERE", // Replace with your actual client ID
// ... rest of config
})
⚠️ Common Issues
“Failed to fetch project configurations”
Cause: Client ID doesn’t match Web3Auth environment
Solutions:
- Verify client ID is correct
- Check if using Sapphire Devnet client ID with Sapphire Mainnet code (or vice versa)
- Ensure
localhost:3000
is in allowed origins - Check project is active in Web3Auth dashboard
“Wallet is not ready yet”
Cause: Network configuration mismatch
Solutions:
- Verify XRPL is enabled in your Web3Auth project
- Check network configuration matches your CLI selection
- Ensure project has proper blockchain permissions
🎯 Environment Combinations
Use Case | Web3Auth Env | XRPL Network | Notes |
---|---|---|---|
Development | Sapphire Devnet | Testnet | Free XRP, testing |
Staging | Sapphire Mainnet | Testnet | Production auth, test XRP |
Production | Sapphire Mainnet | Mainnet | Real XRP, live users |
🔗 Next Steps
- Environment Configuration - Set up .env files
- Network Selection Guide - Choose the right networks
- Troubleshooting - Fix common issues
💡 Tips
- Start with Sapphire Devnet + XRPL Testnet for development
- Test thoroughly before moving to production
- Client IDs are environment-specific (devnet vs mainnet)
- Always add your production domain to allowed origins before deployment