Skip to content

FrozenRidge/level-userdb-passport

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

level-userdb-passport

PassportJS helpers for storing users in level-userdb

Installing

npm install level-userdb-passport

Using

These are designed to be used with the passport-local LocalStrategy. Module expects to be passed a level-userdb instance.

var db = require('level-userdb')()
var helpers = require('level-userdb-passport')(db)
var LocalStrategy = require('passport-local').LocalStrategy
var Passport = // ...


Passport.use(new LocalStrategy({usernameField:'email'}, helpers.localStrategyVerify))
Passport.deserializeUser(helpers.deserializeUser)
Passport.serializeUser(helpers.serializeUser)

About

PassportJS helpers for storing users in level-userdb

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published