passport-google-token
passport-google-token copied to clipboard
Request pending
See:
import { Strategy as GoogleStrategy } from 'passport-google-token';
import passport from 'passport';
import { Router } from 'express';
import { User } from './models';
const router = Router();
passport.use(new GoogleStrategy({
clientID: 'CLIENT',
clientSecret: 'SECRET',
},
function(accessToken, refreshToken, profile, done) {
User.create({metaData: profile}).then(function(user, err) {
done(null, user, user);
});
}
));
router.post('/google/callback',
passport.authenticate('google-token'),
function(req, res) {
console.log('HERE!!!!');
res.send('req');
// Successful authentication, redirect home.
}
);
export default router;
For some reason it stays as pending request...
Did you notice that you send the access token and not the token id to the server?