javascript 社交提供商的DEFAULT护照身份验证

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了javascript 社交提供商的DEFAULT护照身份验证相关的知识,希望对你有一定的参考价值。

exports.google = passport.authenticate('google', {
  scope: ['https://www.googleapis.com/auth/plus.login', 'email', 'profile']
});

exports.googleCallback = passport.authenticate('google', {
  failureRedirect: 'back', // if fail, where to go
  failureFlash: 'Failed connect with Google!', // if fail, what to flash
  successRedirect: '/account', // if success, where to go
  successFlash: 'Google is now connected!' // if success, what to flash
});

exports.twitter = passport.authenticate('twitter', { scope: ['include_email=true'] });

exports.twitterCallback = passport.authenticate('twitter', {
  failureRedirect: 'back', // if fail, where to go
  failureFlash: 'Failed to connect with Twitter!', // if fail, what to flash
  successRedirect: '/account', // if success, where to go
  successFlash: 'Twitter is now connected!' // if success, what to flash
});

exports.facebook = passport.authenticate('facebook', { scope : ['email'] });

exports.facebookCallback = passport.authenticate('facebook', {
  failureRedirect: 'back', // if fail, where to go
  failureFlash: 'Failed connect with Facebook!', // if fail, what to flash
  successRedirect: '/account', // if success, where to go
  successFlash: 'Facebook is now connected!' // if success, what to flash
});

以上是关于javascript 社交提供商的DEFAULT护照身份验证的主要内容,如果未能解决你的问题,请参考以下文章

微信专属输入法你有了吗?防窃听护隐私

使用 javascript 库的社交网络图 [关闭]

WPS的PDF护眼色RGB是多少?

如何在 Vue CLI 4 和 Electron 项目中保护环境变量中的 API 密钥

accp8.0转换教材第11章JAjax加护扩展理解与练习

将社交媒体的外部 Javascript 加载到网页中的目的 [关闭]