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 0.5.0 to 0.5.1

12

lib/framework/koa.js

@@ -22,8 +22,14 @@ /**

return function* passportInitialize(next) {
var ctx = this
// koa <-> connect compatibility:
this.passport = {}
var req = createReqMock(this)
Object.defineProperty(ctx.req, 'user', {
enumerable: true,
get: function() { return ctx.passport.user }
})
var req = createReqMock(ctx)
// add aliases for passport's request extensions to `ctx`
var ctx = this, login = ctx.req.login
var login = ctx.req.login
ctx.login = ctx.logIn = ctx.req.login = function(user, options) {

@@ -36,3 +42,3 @@ return login.bind(req, user, options)

yield middleware.bind(middleware, req, this)
yield middleware.bind(middleware, req, ctx)
yield next

@@ -39,0 +45,0 @@ }

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

},
"version": "0.5.0",
"version": "0.5.1",
"description": "Passport middleware for Koa",

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

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