florianheinemann/passport-dropbox-oauth2

redirects to failureRedirect on authentication callback

Opened this issue · 3 comments

I am using Krakenjs >1.0

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

Even though the authentication is successful, and I am able to load the profile obj, I am always redirected to "/auth", when I should be redirected to "/home".

I've even tried:

router.get('/dropbox/callback', passport.authenticate('dropbox', {
session: false,
successRedirect: '/home',
failureRedirect: '/auth',
failureFlash: true
}));

Any help would be great! Thanks!

Having the same issue as well. I'm getting the profile object no problem, but still getting the failureRedirect

The same issue using passport-dropbox-oauth2 (Ref. http://www.passportjs.org/packages/passport-dropbox-oauth2/), the callback is not getting called. The strategy works fine locally, but when deployed on AWS cloud lambda, not getting the access and refresh token and is redirected to the failure redirect url.

Can someone please look into the issue?