Authentication & Onboarding
This guide establishes guest-first authentication patterns that prioritize user experience and reduce friction. The key principle: never gate the first screen on sign-in unless absolutely necessary.When to Require Authentication
Use this decision tree to determine when authentication is needed:✅ No Auth Required
- Read-only content: Browse, view, search
- Public data: Leaderboards, trending content, general information
- Demos and previews: Let users try core functionality
- Educational content: Tutorials, guides, documentation
⚠️ Optional Auth (Personalization)
- Saved preferences: Theme, favorites, settings
- Progress tracking: Game scores, reading progress
- Social features: Following, likes, comments
- Recommendations: Personalized content feeds
🔒 Required Auth (Transactions)
- Wallet operations: Send, receive, swap tokens
- Smart contract interactions: Minting, staking, voting
- Paid features: Premium content, subscriptions
- User-generated content: Creating posts, uploading media
Implementation Patterns
Pattern 1: Browse-First Template
For apps with significant read-only value:Pattern 2: Action-Gated Authentication
For transaction-focused apps with minimal browse value:Pattern 3: Progressive Enhancement
Gradually unlock features based on authentication:Authentication Flow UX
User-Friendly Prompts
Always explain why authentication is needed:Error Handling
Provide clear guidance when authentication fails:Best Practices
✅ Do
Clear Value Communication
Graceful Degradation
Progressive Disclosure
❌ Don’t
Force Unnecessary Auth
Use Technical Language
Ignore Auth Failures
Testing Authentication Flows
Test Cases
Ensure your auth flow handles these scenarios:Manual Testing Checklist
- First Screen: No auth required to see value
- Auth Prompts: Clear reasoning and benefits
- Error Handling: Graceful failure modes
- Guest Mode: Alternative functionality available
- Retry Logic: Can recover from temporary failures
- User Decline: Respects user choice not to authenticate
Common Patterns by App Type
Games & Entertainment
- Browse: Leaderboards, game previews, rules
- Optional Auth: Save progress, social features
- Required Auth: Earn rewards, compete in tournaments
DeFi & Finance
- Browse: Price data, market information, tutorials
- Optional Auth: Personalized watchlists, price alerts
- Required Auth: All transactions, portfolio management
Social & Content
- Browse: Public posts, trending content, profiles
- Optional Auth: Likes, follows, personalized feeds
- Required Auth: Create posts, private messaging
E-commerce & Marketplaces
- Browse: Product catalogs, reviews, search
- Optional Auth: Wishlist, recommendations, reviews
- Required Auth: Purchases, selling, order history
Resources
- Quality Checklist: Authentication requirements for featuring
- Language & Tone: Copy guidelines for auth prompts
- Error Handling: Comprehensive error management
- Templates: Pre-built authentication patterns
Getting HelpFor authentication implementation questions, join the Base MiniApp office hours or consult the community Discord.