https://github.com/jefferson1104/nextjs-auth
Authentication with nextjs using server side rendering.
https://github.com/jefferson1104/nextjs-auth
nextjs ssr typescript
Last synced: 3 months ago
JSON representation
Authentication with nextjs using server side rendering.
- Host: GitHub
- URL: https://github.com/jefferson1104/nextjs-auth
- Owner: jefferson1104
- Created: 2021-09-09T12:43:49.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-10-27T14:11:39.000Z (over 3 years ago)
- Last Synced: 2025-01-11T14:47:52.583Z (5 months ago)
- Topics: nextjs, ssr, typescript
- Language: TypeScript
- Homepage:
- Size: 185 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## About this project
Authentication project with Next.js, this project serves as an example of how to authenticate sending requests to a Nest.js API with JWT (json web token), control access routes (pages) according to user login, after log in we save the token in cookies and the user has access to a protected page for 60 seconds, when this token expires the user is redirected to the login page.## Run the project
```bash
# Clone front-end repository
$ git clone https://github.com/jefferson1104/nextjs-auth.git# Clone API repository
$ git clone https://github.com/jefferson1104/nestjs-auth.git# Run API project
$ cd nestjs-auth
$ code .
$ npm run start:dev# Run front-end project
$ cd nextjs-auth
$ code .
$ npm run dev# Routes
/
/login
/private# Users
jefferson1104
123456joel3007
123456
```## Screenshots

