Skip to content

Conversation

@resourcefulmind
Copy link

Add Supabase Auth + Solana Deep Guide

Summary

Adds a comprehensive guide for integrating Supabase Web3 authentication with Solana wallet-based applications. Includes step-by-step setup instructions, architecture explanations, troubleshooting, and best practices.

What's Included

  • New guide: apps/web/content/guides/getstarted/supabase-auth-guide.mdx
    • 1,486 lines covering complete authentication flow
    • Uses MDX components (<Steps>, <Callout>) consistent with other guides
  • Navigation: Added to meta.json in Get Started section

Guide Structure

14 sections covering: Introduction, Setup, Wallet Connection, Authentication, Protected Routes, Architecture Deep Dive, Extension Guide, Troubleshooting, Best Practices, and Conclusion.

Key Features

  • Step-by-step setup instructions with code examples
  • Troubleshooting section for common issues
  • Architecture explanations and best practices
  • Visual guidance with screenshots

Testing

  • Proper frontmatter and formatting
  • Added to navigation
  • No linting errors
  • Uses MDX components (<Steps>, <Callout>) matching other guides

- Add comprehensive guide for integrating Supabase Web3 authentication with Solana wallets
- Guide covers setup, wallet connection, authentication flow, protected routes, and best practices
- Update meta.json to include the new guide in the Get Started section
- Convert Section 6 setup steps to use <Steps> and <Step> components
- Add <Callout type="warn"> for critical Web3 auth step
- Add <Callout type="warn"> for Devnet rate limits warning
- Format code blocks and improve consistency with other guides
@vercel
Copy link

vercel bot commented Nov 15, 2025

@resourcefulmind is attempting to deploy a commit to the Solana Foundation Team on Vercel.

A member of the Team first needs to authorize it.

@GuiBibeau GuiBibeau self-requested a review November 15, 2025 17:15
@vercel
Copy link

vercel bot commented Nov 17, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
solana-com Ready Ready Preview Nov 17, 2025 10:02am

Copy link
Contributor

@GuiBibeau GuiBibeau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great start. We need to focus on narrowing down:

  • Newer version everywhere(next.js, node.js), let's avoid the AI suggested version which are already out of date. If the template needs to be updated let's also send a PR to update them.
  • Wrong cloning instructions. create-solana-dapp makes this way more easier than cloning the entire template repo. (see image). The cloning instructions are copyable
  • Let's add in the link to the template in the tutorial: https://templates.solana.com/supabase-auth.
  • Let's narrow down the tutorial to only getting started and happy path. The rest is too much information for a dev reading this to use the template.
  • Let's avoid web3 unless it is a code method and such. Solana goes beyond web3 and is fully fledged as a technology paltform.
Image

date: 2025-01-22T00:00:00Z
difficulty: beginner
title: "Supabase Auth + Solana Deep Guide"
seoTitle: "Supabase Auth + Solana Deep Guide"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should that not be a bit more descriptive? Without spamming keywords, we should ensure we start from the end result:

What would a somebody ask an LLM or search on google to end up on this post.

Let's find a better title like:

"How to implement authentication with Supabase and Solana as the Identity Provider"

Title is just an example, reverse engineer the intent of the engineer to craft your title


## Table of Contents

1. [Introduction](#1-introduction)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the table of content is automatically generated from the headers. Confirm by running this locally and delete the table of content here if needed

Image


## 1. Introduction

This guide shows you how to build a [Solana](https://solana.org) app with wallet
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.org is the solana foundation website. If you keep a link here have it be solana.com/developer (validate the right one don't copy paste this)

Validate also if it really helps SEO to link back to the current site this will be on. If there's no benefits let's remove it, it's non needed cognitive overload from a pure tutorial perspective

authentication using [Supabase](https://supabase.com). Users sign in with their
Phantom or Solflare wallet. No email. No passwords. Just a wallet signature.

Traditional auth means managing user accounts, password resets, and email
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's use authentication instead of Auth. Let's update everywhere we use auth unless it refers to a product name.

verification. With Solana wallet auth, users prove they control a wallet
address. That's it. It's simpler for them. It's simpler for you.

The template uses Supabase's Web3 authentication. Supabase handles the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's avoid the term web3 unless we are refering to the actual supabase method. Web3 as a term should be retired when talking about Solana.

Comment on lines +495 to +508
1. Go to [supabase.com](https://supabase.com) and sign in
2. Click "New Project"
3. Fill in your project details:
- Name it something memorable (like "solana-auth-test")
- Set a database password (save this somewhere safe)
- Choose a region close to you
4. Wait for the project to finish provisioning (about 2 minutes)

Once your project is ready, you'll see the project dashboard. Don't close this
tab. You'll need it for the next steps.

Supabase needs a project to store user sessions and handle authentication. Each
project has its own database and API keys. The free tier gives you everything
you need for development.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it worth doing a short video or screen shot section or not?

Comment on lines +618 to +621
If you see "Invalid environment variables" in your terminal, check your
`.env.local` file. Make sure both keys are set correctly. If you see "Port 3000
is already in use", something else is running on that port. Kill that process or
change the port with `npm run dev -- -p 3001`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need for the level of details

</Step>
</Steps>

## 7. Connecting Your Wallet
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we let people know they need a wallet installed?

blockchain data. Then you authenticate with Supabase to create a session.
They're separate steps.

**Separation of concerns** - You might want to show wallet balances without
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove, non needed to get started.

Comment on lines +676 to +696
### Verifying the connection

After connecting, check the header. The button should show your wallet address.
If you see "Select Wallet" still, the connection didn't work. Try clicking it
again.

You can also check the browser console. Open DevTools (F12) and look for errors.
If you see "wallet not found" or similar, your wallet extension might not be
enabled. Make sure it's installed and active in your browser.

### Understanding the network

The template connects to Solana Devnet by default. Devnet is a test network. It
has free test tokens. You can see the network in the header next to the wallet
button. It should say "Devnet" or "Localnet".

Devnet is safe for testing. You can request airdrops without spending real
money. Transactions are fast and free. When you're ready for production, you'll
switch to Mainnet.

The network configuration is in `src/components/solana/solana-provider.tsx`. It
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like at this point users have the happy path handled right? Do we need to discuss the rest you think? I'd be happy if we cut to this point already without going deeper about airdrop and such.

We want this tutorial to be a super straight forward way of understanding supabase + solana. I'd avoid all the extra bits of details.

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