mis-passport-login-middleware
v0.1.18
Published
passport login middleware
Downloads
8
Readme
MIS系统统一登录中间件
var passportLoginMw = require("mis-passport-login-middleware");
app.use(passportLoginMw({
hostname: 'http://localhost:8080', // 上线后应该填写为正式的passport地址
path: '/something', // 登录成功后的回调地址
isSameDomain: true // 是否在同一域下
})
API
var mw = require("mis-passport-login-middleware");
res.redirect = mw.makeUrl({
hostname: 'http://localhost:8080',
path: '/something',
isSameDomain: true
}, req.session);