passport-offline
PassportJS Provider to allow for easy offline development
Last updated 7 years ago by mheap .
BSD · Repository · Original npm · Tarball · package.json
$ cnpm install passport-offline 
SYNC missed versions from official npm registry.

passport-offline

passport-offline is an authentication strategy for PassportJS that I developed for a project that I was working on that required Twitter authentication. Whilst Twitter auth is useful, it made life very difficult when developing the app whilst offline, and so passport-offline was born.

Examples

There's only one example, as the provider is really simple. Whatever you pass into the first parameter as an object, you'll get back as the user's profile object. It's as simple as that.

passport.use(new OfflineStrategy({
    "profile": {
      id: 1234,
      username: 'mheap' 
    }
  },
  function(user, done) {
    User.findOrCreate(profile, function (err, user) {
      done(err, user);
    });
  }
));

Current Tags

  • 0.1.0                                ...           latest (7 years ago)

1 Versions

  • 0.1.0                                ...           7 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 0
Last Month 1
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |