Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

koa-passport

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koa-passport - npm Package Compare versions

Comparing version 3.0.0 to 4.0.0

9

CHANGELOG.md
# Changelog
## upcoming 3.0
## 4.0.0
- upgrade `passport` to 0.4
- add `ctx` getter to `req` #89
## 3.0.0
- remove `ctx.passport` and save state variables (like `_passport` and `user`) in `ctx.state` instead

@@ -122,2 +127,2 @@ - prevent `passport` from monkey patching `http.IncomingMessage`

- `passport 0.2.x compatibility
- `passport 0.2.x compatibility

@@ -147,2 +147,9 @@ // Koa and Express are fundamental different in how they deal with extensions

Object.defineProperty(req, 'ctx', {
enumerable: true,
get: function() {
return ctx
}
})
// add passport http.IncomingMessage extensions

@@ -149,0 +156,0 @@ req.login = IncomingMessageExt.logIn

@@ -7,3 +7,3 @@ {

},
"version": "3.0.0",
"version": "4.0.0",
"description": "Passport middleware for Koa",

@@ -21,10 +21,10 @@ "keywords": [

"dependencies": {
"passport": "^0.3.2"
"passport": "^0.4.0"
},
"devDependencies": {
"chai": "^3.5",
"koa": "^2.0.0-alpha.5",
"koa-bodyparser": "^4.0.0",
"chai": "^4.1",
"koa": "^2.3.0",
"koa-bodyparser": "^4.2.0",
"koa-route": "^3.2",
"mocha": "^3.0",
"mocha": "^3.5.0",
"passport-local": "^1.0",

@@ -31,0 +31,0 @@ "supertest": "^3.0"

@@ -29,6 +29,5 @@ # koa-passport

// Sessions
const convert = require('koa-convert') // necessary until koa-generic-session has been updated to support koa@2
const session = require('koa-generic-session')
const session = require('koa-session')
app.keys = ['secret']
app.use(convert(session()))
app.use(session({}, app))

@@ -48,3 +47,3 @@ const passport = require('koa-passport')

ctx.isUnauthenticated()
ctx.login()
await ctx.login()
ctx.logout()

@@ -51,0 +50,0 @@ ctx.state.user

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc