Skip to content

Simple JWT Authorization template made with ExpressJs and MongoDB

Notifications You must be signed in to change notification settings

brandonbondig/JWT-Authorization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

JWT Authorization

Simple JWT Authorization template made with ExpressJs and MongoDB.

Example on how to implement user authorization, with user information encrypted and stored in a MongoDB type database.

Requirements

This repo requires the following to run:

Remember to create a .env file in ./server

  • DATABASE: Your mongoDB path.
  • JWT_TOKEN: Your JWT secret.

API Reference

Register User

  POST /api/register
Body Type Description
username string Required. Username
password string Required. Password

User Login

  POST /api/login
Parameter Type Description
username string Required. Username
password string Required. Password

Change Password

  POST /api/change_password
Parameter Type Description
newPassword string Required. New Password
token string Required. JWT Token

About

Simple JWT Authorization template made with ExpressJs and MongoDB

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published