jaredhanson / passport-github

GitHub authentication strategy for Passport and Node.js.
https://www.passportjs.org/packages/passport-github/?utm_source=github&utm_medium=referral&utm_campaign=passport-github&utm_content=about
MIT License
537 stars 290 forks source link

passport-github always goes to failureRedirect #63

Closed ghost closed 7 years ago

ghost commented 7 years ago

When I register through Github to my web app, I allow my app to access my profile. It writes my profile to the database no problem. But then I go to the failureRedirect on the client, which should not happen since I approved it.

Routes:

router.get('/github/callback', passport.authenticate('github', {
    failureRedirect: '/errorforsure'
}), function(req, res) {
    res.redirect('/');
});

router.get('/github', passport.authenticate('github', {
        scope: ['user']
}));
ghost commented 7 years ago

I forgot to run webpack to update my link to /github -.-