📜  oauth twitter - 任何代码示例

📅  最后修改于: 2022-03-11 14:56:14.349000             🧑  作者: Mango

代码示例1
app.get('/auth/twitter',
  passport.authenticate('twitter'));

app.get('/auth/twitter/callback', 
  passport.authenticate('twitter', { failureRedirect: '/login' }),
  function(req, res) {
    // Successful authentication, redirect home.
    res.redirect('/');
  });