Which middleware is commonly used in Express.js to handle user authentication?
- express-auth
- passport
- jsonwebtoken
- authenticator
In Express.js, the commonly used middleware for handling user authentication is passport. Passport is a widely adopted authentication middleware that provides various authentication strategies for different authentication providers like local, Google, Facebook, and more. The other options are not standard authentication middleware for Express.js.
Loading...
Related Quiz
- You are working on a Node.js project with a team, and you notice that the package-lock.json file is frequently causing merge conflicts. How would you resolve or minimize such conflicts while ensuring consistent dependency resolution?
- How can you store and retrieve uploaded files efficiently in a cloud storage service?
- Closures, by preserving the scope chain at the time of their creation, enable the implementation of ________ patterns in JavaScript.
- The Buffer.isBuffer(obj) method in Node.js is used to determine if an object is a ______.
- The aud claim in a JWT token represents the ________ for which the JWT is intended.