Skip to content

we-mid/quick-login

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

quick-login

Quick login for express, basic-auth only

Usage

With your findUser callback:

app.use(require('quick-login')(function checkAuth(data, next){
  findUser({
    username: data.name,
    password: data.pass
  }, function(e, user){
    next(e, !!user)
  })
}))

Or just with inline code:

app.use(require('quick-login')(function checkAuth(data, next){
  next(null, data.name === 'fritx' &&
    data.pass === 'momo')
}))

Todo

  • onVisit/onFail page display
  • beautiful dialog and ajax
  • even passwordless support

About

Quick login for express, basic-auth only

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published