Skip to content

Add Privy authentication template (Next.js + Tailwind)#329

Open
dovidmoishe wants to merge 2 commits intosolana-foundation:mainfrom
dovidmoishe:feat/privy-auth-template
Open

Add Privy authentication template (Next.js + Tailwind)#329
dovidmoishe wants to merge 2 commits intosolana-foundation:mainfrom
dovidmoishe:feat/privy-auth-template

Conversation

@dovidmoishe
Copy link

Overview

This PR adds a new community template demonstrating authentication in a Solana dApp using Privy.

The template includes:

  • Social login (Google, Discord, Twitter)
  • Embedded wallet creation
  • User profile display with wallet information
  • Protected route example
  • Authentication status indicators
  • Wallet Balance
  • Logout functionality

Tech Stack

  • Next.js (App Router)
  • TypeScript
  • Tailwind CSS
  • Privy React SDK
  • Solana Web3.js

Template Location

community/privy-auth/

Features

  • PrivyProvider initialization
  • Embedded wallet creation on login
  • Protected /dashboard route
  • Wallet connection state management
  • Example UI for login/logout and user profile

Setup

After scaffolding:

pnpm create solana-dapp --template privy-auth

Developers must add their Privy App ID:

NEXT_PUBLIC_PRIVY_APP_ID=your_app_id

Full setup instructions are provided in the README.

Notes

This template demonstrates a minimal production-ready integration of Privy authentication within a Solana dApp.

@github-actions
Copy link

This pull request has been automatically marked as stale because it has not had any activity for 7 days.

It will be closed in 7 days if no further activity occurs.

If you believe this PR is still relevant, please add a comment or push new commits to keep it open.

Thank you for your contributions!

@github-actions github-actions bot added the stale label Mar 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant