Connecting Phantom to a Web App Changed How I Think About 'Login'

Published: (April 27, 2026 at 09:05 PM EDT)
2 min read
Source: Dev.to

Source: Dev.to

Overview

On Day 4 of #100DaysOfSolana, I built a small Vite app that connects to a browser wallet. The feature itself is only about 30 lines of code, but the mindset shift it triggered is harder to measure.

Minimal Web App

A minimal web app that:

  • Detects installed wallets using getWallets() from @wallet-standard/app
  • Filters for Solana‑compatible wallets by checking wallet.chains
  • Prompts Phantom to connect with one button click
  • Displays the connected address and devnet balance
import { getWallets } from "@wallet-standard/app";

const { get } = getWallets();
const solanaWallets = get().filter(wallet =>
  wallet.chains.some(chain => chain.startsWith("solana:"))
);

No API keys. No backend. No session management. The wallet handles all of it.

Trust Model Comparison

In Web 2, “Sign in with Google” feels like a convenience feature: you hand your identity to Google, which issues a token to the app. The app trusts Google, and you trust Google. Everything flows through Google.

With Phantom, the app never sees your private key and never talks to a central auth server. It sends a connection request to your wallet extension, which prompts you to approve it. If you approve, the app receives only your public address—nothing more. Every subsequent action that needs your signature goes through the same approval flow.

The trust model is completely inverted:

  • The app does not authenticate you.
  • You authenticate yourself, and the app merely observes the result.

“Sign in with Phantom” isn’t “Sign in with Google for Web 3.” It’s closer to showing your passport: the app sees proof of who you are, but it never holds the passport itself.

Looking Ahead

Week 2 of the challenge focuses on writing transactions and moving tokens on‑chain. I’m looking forward to seeing how that signing flow works end‑to‑end—from the user clicking a button, to Phantom prompting for approval, to the transaction landing on devnet.

Call for Feedback

If you’re following along, drop your wallet setup experience below. Did anything about the browser‑wallet model surprise you?

Part of my #100DaysOfSolana journey.

0 views
Back to Blog

Related posts

Read more »