passport-redgate

A passport provider for Red Gate ID.

Build Status Dependency Status NPM version

Installation

npm install passport-redgate

Example

var RedGateStrategy = require('passport-redgate')

passport.use(new RedGateStrategy({
    returnURL: 'http://localhost:3000/login',
    realm: 'http://localhost:3000/'
  },
  function(identifier, done) {
    User.findByOpenID({ openId: identifier }, function (err, user) {
      return done(err, user);
    });
  }
));


app.get('/login', passport.authenticate('redgate'), function(req, res){
  // Successful authentication, redirect home.
  res.redirect('/');
});

License

MIT

Supported by

SEARCH FOR STRATEGIES

0STRATEGIES