https://github.com/stackblogger/jwt-auth-boilerplate
A Node.Js boilerplate built using Express.Js framework to provide a skeleton of User Authentication using JSON Web Token (JWT) library.
https://github.com/stackblogger/jwt-auth-boilerplate
Last synced: 6 months ago
JSON representation
A Node.Js boilerplate built using Express.Js framework to provide a skeleton of User Authentication using JSON Web Token (JWT) library.
- Host: GitHub
- URL: https://github.com/stackblogger/jwt-auth-boilerplate
- Owner: stackblogger
- Created: 2019-11-24T15:01:05.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-22T13:13:56.000Z (about 3 years ago)
- Last Synced: 2025-03-27T10:36:04.015Z (11 months ago)
- Language: JavaScript
- Homepage:
- Size: 83 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# jwt-auth-boilerplate
A Node.Js boilerplate built using Express.Js framework to provide a skeleton of User Authentication using JSON Web Token (JWT) library.
## Getting Started
The easiest way to get started is to clone the repository:
```sh
# Get the latest snapshot
git clone https://github.com/jimcute/jwt-auth-boilerplate.git
# Change directory
cd jwt-auth-boilerplate
# Install NPM dependencies
npm install
# Then simply start your app
node app.js
```
## Features
- **Local Authentication** using Email and Password
- MVC Project Structure
- JWT Authentication
### Register API
**Type:** POST
**Parameters:** email, password, firstname, lastname
```sh
# Call the API using Postman with the required parameters
http://localhost:3000/api/auth/register
```

### Login API
**Type:** POST
**Parameters:** email, password
```sh
# Call the API using Postman with the required parameters
http://localhost:3000/api/auth/login
```

### Get Logged-In User Profile
**Type:** GET
**Headers:** x-access-token
```sh
# Call the API using Postman with the required parameters
http://localhost:3000/api/v1/me
```
