passport google oauth on localhost

前端 未结 3 940
时光取名叫无心
时光取名叫无心 2020-12-30 04:49

I am quite new at using passport for authentication over node, hence the lot of code snippets

my server is configured as :

var router = require(\'./a         


        
3条回答
  •  情书的邮戳
    2020-12-30 05:22

    I agree with you @Seiya but I would add a redirect

    app.get(
        "/auth/google/callback", 
        passport.authenticate('google'),
        (req, res) => {
          res.redirect('/whatever')
        }
    );
    

提交回复
热议问题