Skip to content

Add wallet-based authentication with session persistence#4

Open
Copilot wants to merge 8 commits intomainfrom
copilot/add-user-login-feature
Open

Add wallet-based authentication with session persistence#4
Copilot wants to merge 8 commits intomainfrom
copilot/add-user-login-feature

Conversation

Copy link

Copilot AI commented Feb 7, 2026

Implements Web3 authentication flow with persistent sessions for the SolVoid dashboard. Users must connect a Solana wallet to access the application.

Changes

Core Authentication (useAuth.tsx)

  • React Context provider managing isAuthenticated, isLoading, and wallet address state
  • Session persistence via localStorage with wallet address validation
  • login() navigates to /login, logout() disconnects wallet and clears session
  • Auto-reconnect on mount if valid session exists

Login Page (/login/page.tsx)

  • Dedicated route with wallet connection interface
  • Auto-redirects to dashboard when wallet connects
  • Shows supported wallets: Phantom, Solflare, Coinbase, Trust, Ledger

Route Protection (ProtectedRoute.tsx)

  • HOC wrapper redirecting unauthenticated users to /login
  • Displays loading state during auth verification

Integration

  • layout.tsx: Wraps app with <AuthProvider>
  • page.tsx: Wraps dashboard with <ProtectedRoute>, uses logout() for disconnect

Technical Details

Session Schema:

// localStorage key: 'solvoid_session'
{ address: string, timestamp: number }

Auth Flow:

Visit → Check session → Valid? → Dashboard
                     → Invalid? → /login → Connect wallet → Store session → Dashboard

Dependencies: Integrates with existing @solana/wallet-adapter-react ecosystem, no backend changes required.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • claude.ai
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

https://claude.ai/share/487b9070-2fb6-43de-afc1-421eacabde2b


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits February 7, 2026 20:40
Co-authored-by: paseka10jaroslav-coder <252813980+paseka10jaroslav-coder@users.noreply.github.com>
@paseka10jaroslav-coder paseka10jaroslav-coder marked this pull request as ready for review February 7, 2026 20:42
Copilot AI and others added 2 commits February 7, 2026 20:42
Co-authored-by: paseka10jaroslav-coder <252813980+paseka10jaroslav-coder@users.noreply.github.com>
Co-authored-by: paseka10jaroslav-coder <252813980+paseka10jaroslav-coder@users.noreply.github.com>
Co-authored-by: paseka10jaroslav-coder <252813980+paseka10jaroslav-coder@users.noreply.github.com>
Co-authored-by: paseka10jaroslav-coder <252813980+paseka10jaroslav-coder@users.noreply.github.com>
Copilot AI changed the title [WIP] Add user login feature to the application Add wallet-based authentication with session persistence Feb 7, 2026
…inter-exception

Add missing documentation for Web3 login feature
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants