NEXTAUTH DEMO

small paint dot
NextAuth Demo website image

Project Overview

A Next.js 15 demo focusing on authentication and role-based authorization. It uses NextAuth.js with both Credentials and Google OAuth providers, enforces account linking, and protects routes/APIs with role checks.

Tech Stack

  • Next.js 15 (App Router)
  • NextAuth.js with PostgresAdapter and custom callbacks
  • PostgreSQL for user/session/storage
  • Tailwind CSS and MU or the UI
  • React Hook Form and Zod for form control and schema validation
  • Features

  • Auth flows with Credentials and Google OAuth
  • Account linking via NextAuth callbacks to ensure the same email across providers
  • Role-based authorization using middleware to gate pages and API routes
  • Protected UI (session/role-aware navigation and screens)
  • home page icon
    One step at a time