Skip to content

splorg/openauth-nextjs-api-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

openauth-nextjs-api-demo

Little demo trying out OpenAuth for centralized authentication

  • Authenticating from a Next.js app
  • Protecting routes in Next.js middleware
  • Authenticating in REST API from cookies or authorization header

How to run

bun install
docker compose up -d
cd packages/db && cp .env.example .env && bunx prisma migrate dev
cd ../auth
cd ../web && cp .env.example .env
cd ../api && cp .env.example .env
cd ../.. && bun dev

Open browser and go to http://localhost:3000

Releases

No releases published

Packages

No packages published