https://github.com/crutchcorn/nextjs-play-auth-middleware
A toy version of an "auth" middleware for Next.js
https://github.com/crutchcorn/nextjs-play-auth-middleware
Last synced: 2 months ago
JSON representation
A toy version of an "auth" middleware for Next.js
- Host: GitHub
- URL: https://github.com/crutchcorn/nextjs-play-auth-middleware
- Owner: crutchcorn
- Created: 2024-06-04T02:29:50.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-06-04T02:31:52.000Z (12 months ago)
- Last Synced: 2025-03-25T01:35:51.124Z (2 months ago)
- Language: TypeScript
- Homepage:
- Size: 46.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This repo demonstrates a toy version of an "auth" middleware that makes sure you have the `name`
cookie before allowing you to make it to the home route (`/`).If you do not, it will redirect you to the login route (`/login`) and allow you to use a React Server Action to add the
`name` cookie value.