Integration
Passkey Integration
Passkeys and Wallets Integration Guide
This guide explains how to integrate your application with the IBEx Fi API for passkey authentication and wallet management.
Table of Contents
- General Architecture
- Domain Configuration
- rpId Logic
- Integration Examples
- Authentication Flow
- Error Handling
- Best Practices
General Architecture
Components
- IBEx Fi API: Central server managing passkeys and wallets
- Local Client: Your development application
- CNAME: DNS redirection to the API
- Database: Storage of authorized domains
Request Flow
Domain Configuration
1. Local Development
For local development with WebAuthn, you must use domains ending with .localhost:
2. CNAME Configuration
Create a CNAME pointing to the staging API:
3. Domain Registration
The domain must be registered in the API database. Contact the IBEx team to add your domain.
rpId Logic
Automatic Calculation
The API automatically calculates the rpId based on the request hostname:
Matching Examples
| Received Hostname | Calculated rpId | Client Domain |
|---|---|---|
passkeys-staging.ibexwallet.org | ibexwallet.org | https://ibexwallet.org |
passkeys-localhost.ibexwallet.org | ibexwallet.org.localhost | http://ibexwallet.org.localhost:3004 |
Integration Examples
Example 1: Local Development
Example 2: Production
Example 3: Wallet Management
Authentication Flow
1. Sign Up
2. Sign In
Error Handling
Common Errors
Token Management
Best Practices
1. Configuration
2. Error Handling
3. Domain Validation
4. Tests
Support
For any questions or integration issues:
- Verify that your domain is registered in the API
- Check the API logs for detailed errors
- Contact the IBEx team with the error details
Note: This documentation is based on the staging environment. For production, replace the URLs with production URLs.