Passport
Simple, unobtrusive authentication for Node.js
...It doesn’t impose specific user model structures or storage strategies but instead offers a unified API driven by “strategies”—small plugins that encapsulate authentication logic for protocols such as local username/password, OAuth, OpenID, SAML, and many others. This design allows developers to plug in only the strategies they need and swap or add new ones without rewriting core application logic, making Passport highly adaptable for diverse authentication requirements. Passport hooks into Express (and similar frameworks) using middleware functions that run during the request lifecycle, simplifying tasks like session management, credential validation, and user serialization.