koa-passport-framework
v1.0.4
Published
Passport framework for Koa
Downloads
7
Maintainers
Readme
koa-passport-framework
Passport framework for Koa
koa version | branch | npm tag ------------| ------ | ------- 1.x | - | unsupported 2.x | master | next
Usage
// body parser
var bodyParser = require('koa-bodyparser')
app.use(bodyParser())
// Sessions
var session = require('koa-session')
app.keys = ['secret']
app.use(session(app))
var passport = require('passport')
passport.framework(require('koa-passport-framework')())
app.use(passport.initialize())
app.use(passport.session())