Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authenticate stuck in loop #13

Open
ochorocho opened this issue Sep 11, 2019 · 1 comment
Open

Authenticate stuck in loop #13

ochorocho opened this issue Sep 11, 2019 · 1 comment

Comments

@ochorocho
Copy link

ochorocho commented Sep 11, 2019

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?

@VincentSC
Copy link

Callback-url in gitlab is also http://localhost:1337/auth/gitlab/callback ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants