简体   繁体   English

如何使用Passport-VKontakte(社交认证)发送令牌?

[英]How send token with Passport-VKontakte (social auth)?

In my app works auth VK, but for understand who is site visitor, need send him token while he click auth vk. 在我的应用程序中,工作原理为auth VK,但是为了了解谁是网站访问者,需要在他单击auth vk时向他发送令牌。 How send token to user with passport-vkontakte? 如何使用通行证vkontakte向用户发送令牌?

app.get('/auth/vk',
  passport.authenticate('vkontakte'),
  function(req, res){

});

app.get('/auth/vk/callback',
  passport.authenticate('vkontakte', {
    failureRedirect: '/auth/vk',
    successRedirect: '/'
  })
);

ps: doc https://github.com/stevebest/passport-vkontakte ps:文档https://github.com/stevebest/passport-vkontakte

vkontakte (social) send own token. vkontakte(社交)发送自己的令牌。 In strategy can take token vkontakte. 在策略上可以采取令牌vkontakte。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM