Skip to content

Privy Auth Template #155

@GuiBibeau

Description

@GuiBibeau

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.

Privy provides embedded wallets and flexible authentication options including social logins, making Web3 onboarding easier for mainstream users. This task proposes adding a Privy Auth template that demonstrates how to use Privy's authentication in a Solana dApp.


Goal

Add a community template at community/privy-auth that includes:

  • A Next.js + Tailwind + TypeScript application with Privy authentication
  • Social login options (Google, Twitter, Discord, etc.)
  • Embedded wallet creation and management
  • User profile management
  • Protected routes example

Deliverables

  1. community/privy-auth/ directory with working template code
  2. README.md explaining:
    • Privy account setup and configuration
    • Dashboard configuration for auth providers
    • Embedded wallet features and benefits
    • Session management approach
    • Links to Privy documentation
  3. Authentication components:
    • Privy login button/modal
    • Social login provider configuration
    • User profile display with wallet info
    • Logout functionality
  4. Example features:
    • Protected routes using Privy session
    • Wallet connection state management
    • User authentication status indicators
  5. package.json with a create-solana-dapp block for post-install guidance
  6. Type definitions for Privy user objects and sessions
  7. Registration in templates.json so template is discoverable under Community Templates

Acceptance Criteria

  • A new directory community/privy-auth exists with a scaffolded Next.js + Tailwind + TypeScript project
  • Privy SDK is integrated with proper initialization
  • Social login options are configured and working
  • Embedded wallet functionality is demonstrated
  • Protected routes example is included
  • README.md includes implementation guide and best practices
  • Template is registered in templates.json
  • pnpm create solana-dapp --template privy-auth works end-to-end

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions