Socket
Book a DemoInstallSign in
Socket

passport-redgate

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

passport-redgate

A passport provider for Red Gate ID

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

passport-redgate

A passport provider for Red Gate ID. There is a full working express app in the example directory.

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(user, done) {
    //user has {id: '<guid>', openID: '<uri>'}
    User.findByOpenID({ openId: user.openID }, function (err, user) {
      return done(err, user);
    });
  }
));


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

Example with e-mail

var RedGateStrategy = require('passport-redgate')

passport.use(new RedGateStrategy({
    auth: {user: 'username', pass: 'password'},
    returnURL: 'http://localhost:3000/login',
    realm: 'http://localhost:3000/'
  },
  function(user, done) {
    //user has {id: '<guid>', openID: '<uri>',
    //          emailAddress: 'foo@red-gate.com',
    //          emailAddressConfirmed: true}
    done(user)
  }
));


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

License

MIT

Keywords

passport

FAQs

Package last updated on 06 Sep 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts