3

I am trying to use Google's sign in api using koa and passport. I'm creating a new GoogleStrategy and that seems to work fine my issue is in the routes I don't want to redirect the user just yet, I want to send some user's info from my DB to the front end. I've tried passing in a function instead of successRedirect but I am not having any luck. I am new to koa and rethinkDB (using it not sure if it matters in this case). Any ideas would be helpful thanks.

//Routes
router.get('/auth/google', passport.authenticate('google' {session:false, scope:['email','profile'], accessType: 'offline', approvalPrompt: 'force'}));

router.get('/auth/google/callback', 
  passport.authenticate('google'),{successRedirect:'/home', failureRedirect:'/'}
);
zakuni
  • 51
  • 12

0 Answers0