{"library":"koa-passport","type":"library","category":null,"description":"koa-passport is a middleware that integrates the popular Passport.js authentication library with the Koa web framework. It simplifies the process of adding various authentication strategies (like local username/password, OAuth, JWT) to Koa applications by exposing Passport's core functionalities directly on the Koa `ctx` object. The current stable version is 6.x, which is designed to work with Koa 2.x and Passport.js 5.x or 6.x. Its release cadence is closely tied to the major versions of its upstream `passport` and `koa` dependencies, ensuring compatibility. Key differentiators include its idiomatic Koa middleware interface, providing `ctx.login()`, `ctx.logout()`, `ctx.isAuthenticated()`, and `ctx.isUnauthenticated()` methods, which streamline user session management and status checks within Koa's async context. It requires external session management middleware like `koa-session` and typically a body parser for credential submission.","language":"javascript","status":"active","version":"6.0.0","tags":["javascript","koa","passport","auth","authentication","authorization"],"last_verified":"Wed May 27","install":[{"cmd":"npm install koa-passport","imports":["const passport = require('koa-passport');","const Passport = require('passport');\nconst LocalStrategy = require('passport-local').Strategy;","const Koa = require('koa');"]},{"cmd":"yarn add koa-passport","imports":[]},{"cmd":"pnpm add koa-passport","imports":[]}],"homepage":null,"github":"https://github.com/rkusa/koa-passport","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/koa-passport","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/koa-passport/compatibility"}}