passport-gitlab

0.5.0 • Public • Published

Prerequisites

Gitlab >= 7.7

var GitlabStrategy = require('passport-gitlab').Strategy;

passport.use(new GitlabStrategy({
    clientID: GITLAB_APP_KEY,
    clientSecret: GITLAB_APP_SECRET,
    gitlabURL : "https://gitlab.example.com",
    callbackURL: "http://127.0.0.1:3000/auth/gitlab/callback"
  },
  function(token, tokenSecret, profile, done) {
    User.findOrCreate({ id: profile.id }, function (err, user) {
      return done(err, user);
    });
  }
));

Readme

Keywords

none

Package Sidebar

Install

npm i passport-gitlab

Weekly Downloads

62

Version

0.5.0

License

none

Last publish

Collaborators

  • erik.seifert