Hi all,
I'm trying to use a refresh token so that I can refresh my access token without requiring the user to log in every hour. With the following code, which gets executed during the facebook login process always shows the refresh_token as undefined. What am I missing?
Hi all, I'm trying to use a refresh token so that I can refresh my access token without requiring the user to log in every hour. With the following code, which gets executed during the facebook login process always shows the refresh_token as undefined. What am I missing?
const passport = require('passport'); const Strategy = require('passport-facebook').Strategy;
passport.use(new Strategy({ clientID: process.env.CLIENT_ID, clientSecret: process.env.CLIENT_SECRET, callbackURL: 'http://localhost:3000/login/facebook/return' }, function(accessToken, refreshToken, profile, cb) { console.log('accessToken: %s', accessToken); console.log('!!!!refreshToken!!!!: %s', refreshToken); // This is always undefined console.log('Profile: %j', profile); ... return cb(null, profile); }));
Thanks, Dave