Overview
Embedded Wallets provide secure, user-friendly authentication methods that eliminate the complexity of traditional crypto wallets. Users can access their wallets through familiar authentication patterns like email one-time passwords (OTP), SMS, and social logins, without ever dealing with seed phrases or browser extensions.Email OTP
Email OTP is the primary authentication method for Embedded Wallets, providing a secure and familiar experience for users.How email OTP works
How email OTP works
- User enters email: The user provides their email address in your application
- OTP sent: A 6-digit one-time password is sent to their email
- User verifies: The user enters the OTP in your application
- Wallet access: Upon successful verification, the wallet is created or accessed
Security features
Security features
- Time-limited codes: OTPs expire after 10 minutes for security
- Rate limiting: Protection against brute force attempts
- Secure delivery: Emails sent through Coinbase’s trusted infrastructure
- Device binding: Wallets are cryptographically bound to the user’s device
User experience benefits
User experience benefits
- No passwords to remember: Users don’t need to create or manage passwords
- Instant onboarding: New users can create a wallet in seconds
- Familiar process: Similar to authentication flows users already know
- Cross-device support: Users can access their wallet from up to 5 devices
Email Customization
By default, all emails are sent without customization. If you’d like to use a custom email template featuring your app’s name and logo, reach out to us on Discord, and we’ll get you set up within one business day.SMS OTP
SMS-based one-time passwords are available as an additional authentication method, providing users with more flexibility in how they access their wallets.How SMS OTP works
How SMS OTP works
- User enters phone number: The user provides their phone number in your application
- OTP sent: A 6-digit one-time password is sent to their phone number
- User verifies: The user enters the OTP in your application
- Wallet access: Upon successful verification, the wallet is created or accessed
Security features
Security features
- Time-limited codes: OTPs expire after 5 minutes for security
- Rate limiting: Protection against brute force attempts
- Secure delivery: Text messages sent through Coinbase’s trusted infrastructure
- Device binding: Wallets are cryptographically bound to the user’s device
User experience benefits
User experience benefits
- No passwords to remember: Users don’t need to create or manage passwords
- Instant onboarding: New users can create a wallet in seconds
- Familiar process: Similar to authentication flows users already know
- Cross-device support: Users can access their wallet from up to 5 devices
Social login providers
Social login through Google, Apple, and X are supported via our SDK using OAuth 2.0. We offer Coinbase-owned OAuth login, allowing users to recognize and trust Coinbase’s brand during the login process.How Social login works
How Social login works
Security features
Security features
- Time-limited codes: Social login sessions are managed using a refresh and access token model with configurable expiration
- Rate limiting: Protection against brute force attempts
- Secure delivery: Login is facilitated by Coinbase’s trusted brand.
User experience benefits
User experience benefits
- No passwords to remember: Users don’t need to create or manage passwords
- Instant onboarding: New users can create a wallet in seconds
- Familiar process: Similar to authentication flows users already know
- Cross-device support: Users can access their wallet from up to 5 devices
Examples
Sign in with social providers using the OAuth flow. Note that the page from which thesignInWithOAuth call occurs will be redirected back to after the user authenticates with their provider. The user will be automatically logged-in when @coinbase/cdp-core re-initializes.
Auth method linking
Once a user is authenticated, you can enable them to link additional authentication methods to their account. This allows users to sign in using multiple methods (email, SMS, OAuth providers) while maintaining access to the same embedded wallet.Why link authentication methods?
Why link authentication methods?
- Meet 2FA requirements: Coinbase Onramp requires both email and phone verification for seamless integration
- Improve account security: Add additional authentication factors as users accumulate more funds
- Enhance account recovery: Multiple methods provide backup options if one method becomes unavailable
- Flexible access: Users can sign in with any linked method and access the same wallet
How it works
How it works
- User must be authenticated: The user signs in using any supported method
- Initiate linking: User requests to link an additional authentication method
- Verify the method: Complete verification (OTP or OAuth flow)
- Linked: The new method is now associated with the same user account and wallet
Custom authentication
Custom authentication enables applications with existing authentication systems to integrate Embedded Wallets seamlessly. Instead of using CDP’s built-in authentication (email OTP, SMS, OAuth), you can use JWTs from your own identity provider.How custom authentication works
How custom authentication works
- Pre-configuration: Configure your JWKS endpoint in CDP Portal
- User logs in: User authenticates with your existing auth system
- JWT generation: Your identity provider generates a JWT for the user
- CDP validation: CDP retrieves your JWKS, validates the JWT and required claims
- Wallet access: CDP uses the stable
subclaim to get or create an embedded wallet
Use cases
Use cases
- Existing user base: You already have users authenticated via Auth0, Firebase, Cognito, or custom solution
- Single sign-on (SSO): Users sign in once across your entire platform
- Enterprise requirements: Need to integrate with corporate identity systems
- Regulatory compliance: Must use specific authentication providers
Requirements
Your identity provider must:- Support JWKS (JSON Web Key Sets) with RS256 or ES256 signing
- Provide required JWT claims:
iss,sub,exp,iat
Getting started
See the complete Custom Authentication guide for setup instructions and code examples.Multi-Factor Authentication (MFA)
Add an extra layer of security to your embedded wallets with Time-based One-Time Password (TOTP) multi-factor authentication. Users can enroll using popular authenticator apps like Google Authenticator, Authy, or 1Password.Key features
Key features
- Industry-standard TOTP: Compatible with all major authenticator apps
- Optional enrollment: Let users choose when to enable MFA
- Flexible verification: Require MFA for specific operations or all sensitive actions
- Easy integration: Simple SDK methods for enrollment and verification
When to use MFA
When to use MFA
- High-value operations: Require MFA for large transactions or withdrawals
- Account security changes: Mandate MFA when changing authentication settings
- Compliance requirements: Meet regulatory requirements for additional authentication
- User preference: Allow security-conscious users to opt-in to enhanced protection
Getting started with MFA
See the complete Multi-Factor Authentication guide for implementation details and code examples.What to read next
- Implementation Guide: Step-by-step guide to implementing these authentication methods
- Auth Method Linking: Link multiple authentication methods to a single wallet
- Session Management: Understand session lifecycle and token management
- Best Practices: Security recommendations and production readiness
- Server-side validation: Validate user sessions on your backend