passport
Installation
SKILL.md
Passport.js
Passport is authentication middleware for Node.js. It is designed to serve a unique purpose: authenticate requests. It delegates all other details (user handling, sessions) to the application.
When to Use
- Node.js Express Authentication Middleware: Integrating authentication into Node.js Express, Koa, or NestJS backend services.
- Pluggable Multi-Strategy Authentication: Combining Local username/password, JWT bearer tokens, and OAuth2 strategies under one interface.
- Established Express Monoliths: Adding authentication to existing enterprise Express codebases with mature session infrastructures.
- Custom Authentication Protocols: Authoring tailored authentication strategies using Passport's clean middleware contract.
Quick Start
import passport from "passport";
import LocalStrategy from "passport-local";