Skip to content

nf-714/Nextjs-Supabase

Repository files navigation

Next.js Authentication with Supabase Tutorial

This repository contains the code for implementing authentication in Next.js 15 using Supabase. Follow along with the tutorial to learn how to add secure authentication to your Next.js applications.

🎥 Video Tutorial

Watch the step-by-step tutorial on YouTube: Build a Modern Auth System in 20 Minutes with NextJS 15 and Supabase

🚀 Getting Started

Prerequisites

  1. Create a Supabase project

    • Sign up for a Supabase account
    • Create a new project
    • Go to Project Settings -> API to find your credentials
  2. Set up environment variables Create a .env.local file in the root directory with the following variables:

    NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url
    NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key

Installation

  1. Clone the repository:

    git clone https://github.com/Kirsanow/nextjs15-auth-tutorial.git
  2. Install dependencies:

    npm install
    # or
    yarn install
    # or
    pnpm install
  3. Run the development server:

    npm run dev
    # or
    yarn dev
    # or
    pnpm dev

Open http://localhost:3000 with your browser to see the result.

🛠 Tech Stack

📚 What You'll Learn

  • Setting up Supabase in a Next.js project
  • Implementing authentication flows
  • Protected routes and middleware
  • Managing user sessions
  • TypeScript integration
  • Best practices for auth in Next.js

🔑 Key Features

  • Email/Password authentication
  • OAuth providers (Google, GitHub)
  • Protected routes
  • Middleware implementation
  • Type-safe authentication
  • Server and client components integration

📖 Additional Resources

💡 Support

If you found this tutorial helpful, please consider:

📄 License

This project is MIT licensed.

About

Authentication Template for Next and Supa with a Hero section

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors