Socket
Socket
Sign inDemoInstall

kk-koa-framework

Package Overview
Dependencies
173
Maintainers
1
Versions
91
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.4 to 2.0.6

src/passport/weixinLogin.js

6

package.json

@@ -6,3 +6,3 @@ {

"name": "kk-koa-framework",
"version": "2.0.4",
"version": "2.0.6",
"description": "kk koa mvc webframework",

@@ -22,2 +22,3 @@ "main": "index.js",

"dependencies": {
"axios": "^0.18.0",
"consolidate": "^0.15.0",

@@ -31,4 +32,5 @@ "get-paths": "0.0.2",

"lodash": "^4.17.5",
"pug": "^2.0.0-rc.4"
"pug": "^2.0.0-rc.4",
"uid2": "^0.0.3"
}
}

@@ -71,1 +71,3 @@ class Passport{

module.exports.AutoLoginStrategy = require('./autoLogin')
module.exports.WeixinStrategy = require('./weixinLogin')

@@ -5,3 +5,3 @@ const Koa = require('../index')

const {RegisterStrategy} = passport
const {RegisterStrategy, WeixinStrategy} = passport

@@ -12,3 +12,3 @@ const app = new Koa()

passport.use(new RegisterStrategy(null,({username,password},done)=>{
passport.use(new RegisterStrategy(()=>{},({username,password},done)=>{
console.log('enter register')

@@ -18,2 +18,11 @@ done(null)

passport.use(new WeixinStrategy({
clientID: 'wxb466441ce83229ba'
, clientSecret: '64fa70131050c949cc114687cd448171'
, callbackURL: 'http://m.leasio.com/weixinLogin'
}, (params) => {
console.log("param:", params)
return params
}))
app.setup()

@@ -20,0 +29,0 @@

@@ -15,2 +15,6 @@ const {passport} = require('../../../index')

module.exports.weixinLogin = [passport.authenticate('weixinLogin'),async (ctx,next)=>{
ctx.body = ctx.session.profile
}]
module.exports.meta = {

@@ -23,3 +27,6 @@ index:{

url:'/login'
},
weixinLogin:{
url:'/weixinLogin'
}
}
SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc