-
Exploring user authentication with JSON web tokens and the Passport module.
- Use JSON web tokens for token-based user authentication
- Use Passport module together with passport-local and passport-local-mongoose for setting up local authentication within your server.
-
Installing Passport and jsonwebtoken Node Modules
-
Install the Passport related Node modules and the jsonwebtoken module as follows:
npm install passport passport-local passport-local-mongoose --save
npm install jsonwebtoken --save