Skip to content

davidpoza/passport-jwt-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example of use of passport-jwt

First of all you must create .env file with these variables:

MONGO_URI=mongodb+srv://user:password@server/db

# secret for encryption of jwt signature
JWT_SECRET=yoursecret

# number of rounds for Blowfish algorithm for hashing user password
BCRYPT_ROUNDS=12

# lifetime of the token (in seconds)
JWT_LIFETIME=86400

# algorithm used in token signing
JWT_ALGORITHM=HS256

# server port
PORT=8080

You can create use a mongodb server at mongodb Atlas service for free.

Install

About

passport-jwt example

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published