https://github.com/splorg/openauth-nextjs-api-demo
https://github.com/splorg/openauth-nextjs-api-demo
bun monorepo nextjs openauth prisma typescript
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/splorg/openauth-nextjs-api-demo
- Owner: splorg
- Created: 2025-01-15T22:50:40.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-16T15:40:45.000Z (over 1 year ago)
- Last Synced: 2025-06-13T07:02:50.392Z (about 1 year ago)
- Topics: bun, monorepo, nextjs, openauth, prisma, typescript
- Language: TypeScript
- Homepage:
- Size: 150 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# openauth-nextjs-api-demo
Little demo trying out [OpenAuth](https://openauth.js.org/) 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
```bash
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