Web has some Authentication Methods : HTTP Basic authentication, tokens, signatures and one-time passwords.
Nodejs’ authentacation is same.
Samples
Nodejs + expressjs + passport + session
https://segmentfault.com/a/1190000002926232Nodejs + expressjs + passport + session + redis
https://blog.risingstack.com/node-hero-node-js-authentication-passport-js/
- Nodejs + token + json
https://scotch.io/tutorials/authenticate-a-node-js-api-with-json-web-tokens