How to implement Google Authentication in Node JS using Passport JS | by Prashant Ram | Medium

PHOTO EMBED

Thu Aug 08 2024 13:06:35 GMT+0000 (Coordinated Universal Time)

Saved by @abhi_550

app.get('/auth/google',
  passport.authenticate('google', { scope: [ 'email', 'profile' ]
}));
app.get('/auth/google/callback', passport.authenticate( 'google', {
   successRedirect: '/dashboard',
   failureRedirect: '/login'
}));
content_copyCOPY

https://medium.com/@prashantramnyc/how-to-implement-google-authentication-in-node-js-using-passport-js-9873f244b55e