Skip to content

Authenticate stuck in loop #13

Description

@ochorocho

Hey,

i'm using sailsjs (latest 1.2.3)
When the gitlab action is called i get an infinite loop.

Action in my controller

  gitlab: function (req, res, next) {
    sails.log.info("Gitlab");
    passport.authenticate('gitlab');
  },

Strategy config

passport.use(new GitLabStrategy({
    clientID: "CLIENT_ID",
    clientSecret: "SECRET",
    callbackURL: 'http://localhost:1337/auth/gitlab/callback',
    baseURL: "https://gitlab.example.org/",
    usernameField: 'username'
  },
  function (accessToken, refreshToken, profile, cb) {

   sails.log.info(profile);

    User.findOrCreate({gitlabId: profile.id}, function (err, user) {
      return cb(err, user);
    });
  }
));

Can't get any debug information, only in the log output of sails.log.info shows up on each loop.
Any idea idea what is going wrong here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions