/JWTValidation_using_express-validator

An example how to validate a JWT token using express-validator

Primary LanguageTypeScript

JWTValidation_using_express-validator

An example how to validate a JWT token using express-validator

Instruction

Run: npm run dev

Put a console.log(token) inside the main index.ts file to generate a token

Use the token to make a POST request to localhost:3000/user

Inside the User index.ts file have a commented part that allow validate that token using a own middleware.