What is the passport in Node.js?
Passport.js is a simple, unobtrusive Node.js authentication middleware for Node.js. Passport.js can be dropped into any Express.js-based web application.
Passport recognizes that each application has unique authentication requirements. Authentication mechanisms, known as strategies, are packaged as individual modules. Applications can choose which strategies to employ, without creating unnecessary dependencies.
By default, if authentication fails, Passport will respond with a 401 Unauthorized
status, and any additional route handlers will not be invoked. If authentication succeeds, the next
handler will be invoked and the req.user property will be set to the authenticated user.
Comments
Post a Comment