Background
The Solana Foundation maintains a templates repo with both official and community templates. Developers use these templates with create-solana-dapp to quickly scaffold projects.
Web3 authentication remains a significant barrier for mainstream adoption. Many dApps need flexible authentication options that go beyond traditional wallet connections. This task proposes adding a Web3Auth template that demonstrates social logins and email authentication using Web3Auth SDK (https://web3auth.io), providing a smooth onboarding experience for mainstream users who may not have crypto wallets.
Goal
Add a community template at community/web3-auth that includes:
- A Next.js + Tailwind + TypeScript application with Web3Auth authentication flows
- Web3Auth SDK integration for social logins (Google, Twitter, Discord, GitHub, etc.)
- Email passwordless authentication
- SMS authentication option
- Embedded wallet generation for new users
- Session management and JWT token handling
- Protected routes and middleware
- User profile management with wallet details
- Environment variables for auth providers and configuration
Deliverables
community/web3-auth/ directory with working template code
README.md explaining:
- Web3Auth account setup at https://web3auth.io
- Dashboard configuration for auth providers
- Verifier setup and custom authentication
- Session management strategy
- Security best practices
- Private key management
- Links to Web3Auth documentation and guides
- Authentication components:
- Web3Auth login modal with provider selection
- Social login buttons (Google, Twitter, Discord, GitHub)
- Email passwordless form
- SMS authentication form
- User profile dropdown with wallet info
- Session status indicators
- API routes for:
- Session validation
- Token refresh
- User data management
- Middleware for route protection
- Wallet functionality:
- Display generated wallet address
- Sign message example
- Send transaction example
package.json with a create-solana-dapp block for post-install guidance
- Type definitions for Web3Auth responses and user sessions
- Registration in
templates.json for discoverability
Acceptance Criteria
Risks
- Provider API changes: Social auth providers may change their APIs; documentation should reference Web3Auth's official docs
- Key management: Users' private keys must be handled securely; Web3Auth's key management should be properly configured
- Network selection: Must ensure correct network configuration between Web3Auth and Solana
- Rate limits: Web3Auth has rate limits on testnet; documentation should mention this
Definition of Done
- All acceptance criteria met
- Template merged into
solana-foundation/templates
- Authentication flow tested with all configured providers
- Web3Auth integration verified on both testnet and mainnet configurations
- Video walkthrough or GIF demonstrating social login flow added to PR
Background
The Solana Foundation maintains a templates repo with both official and community templates. Developers use these templates with create-solana-dapp to quickly scaffold projects.
Web3 authentication remains a significant barrier for mainstream adoption. Many dApps need flexible authentication options that go beyond traditional wallet connections. This task proposes adding a Web3Auth template that demonstrates social logins and email authentication using Web3Auth SDK (https://web3auth.io), providing a smooth onboarding experience for mainstream users who may not have crypto wallets.
Goal
Add a community template at
community/web3-auththat includes:Deliverables
community/web3-auth/directory with working template codeREADME.mdexplaining:package.jsonwith acreate-solana-dappblock for post-install guidancetemplates.jsonfor discoverabilityAcceptance Criteria
community/web3-authexists with scaffolded Next.js projectREADME.mdincludes:templates.jsonwith proper metadatanpm create solana-dapp@latest -t gh:solana-foundation/templates/community/web3-authRisks
Definition of Done
solana-foundation/templates