-
Notifications
You must be signed in to change notification settings - Fork 15
Description
I need to get value in req.headers either of the two.
On hitting route '/auth/fitbit' the value i get in headers should be same in all consoles.
app.get('/auth/fitbit', function(req,res,next){
console.log("console 1",req.headers)
next();
},
passport.authenticate('fitbit', {
scope: ['activity','heartrate','location','profile'],prompt:"login" })
);
app.get('/auth/fitbit/callback',
passport.authenticate('fitbit', { failureRedirect: '/login' }),
function(req, res) {
console.log("console 2 ",req.headers)
// Successful authentication, redirect home.
res.redirect('https://www.google.com');
});
passport.use(new FitbitStrategy({
clientID: "clientID",
clientSecret: "clientSecret",
scope: ['activity', 'heartrate', 'location', 'profile'],
callbackURL: "callbackURL",
},
function (req, accessToken, refreshToken, profile, done) {
console.log("console 3",req.headers);
process.nextTick(function () {
})
})
))