The server for study about authentication on Next.JS using Next Auth. Built using Node.js, Express, JWT and Typescript.
Features | API Reference | Technologies | Installation
This is a server API for study about authentication on Next.JS using Next Auth. The data are all static just for tests purpose.
Some key features are:
- Token and Refresh Token strategy using JWT.
- Roles and Permissions as auth types.
The application is built using Node.JS with Express framework. The data is not stored. The entire codebase is written using Typescript.
The frontend can be found in this repo
Project developed at Chapter IV of Rocketseat's Ignite bootcamp.
POST /session
Body | Type | Description |
---|---|---|
email |
string |
Required. Email of the user |
password |
string |
Required. Password of the user |
All next routes need authentication!
POST /refresh
Body | Type | Description |
---|---|---|
refreshToken |
string |
Required. Refresh token of the user |
GET /me
This is what i used and learned with this project:
- Node.JS
- Express
- JWT
- UUID
- Typescript
To use this project, first you need NodeJS running in your device, then you can follow the commands below:
# Clone this repository
git clone https://github.com/areasflavio/next-auth-server.git
# Go into the repository
cd next-auth-server
# Install dependencies for the backend
yarn install
# To start the express development server, run the following command
yarn dev
Build by Flávio Arêas 👋 Get in touch!