我正在尝试使用节点js的护照模块使用谷歌按钮登录.我想让人们发送电子邮件ID,姓名,个人资料照片.我正在尝试将pic下载到本地服务器.即使在向作用域添加"电子邮件"之后,Google也没有返回电子邮件ID,并且返回的个人资料照片链接也无效.我已经查看了这个问题的各种答案,但是所有人都说要包含userinfo.email.现在已经弃用了.根据谷歌文档新的范围参数是下面的电子邮件是我的代码任何帮助是赞赏护照
passport.use(new GoogleStrategy({
clientID : configAuth.googleAuth.clientID,
clientSecret : configAuth.googleAuth.clientSecret,
callbackURL : configAuth.googleAuth.callbackURL,
},
function(token, refreshToken, profile, done) {
// make the code asynchronous
// User.findOne won't fire until we have all our data back from Google
process.nextTick(function() {
// try to find the user based on their google id
User.findOne({ 'google.id' : profile.id }, function(err, user) {
if (err)
return done(err);
if (user) {
// if a user is found, log them in
return done(null, user);
} else {
// …Run Code Online (Sandbox Code Playgroud) 我在没有 nat 网关/互联网访问的 vpc 中部署了功能。目标:从此函数通过 SES 发送电子邮件(在 vpc 中)
我尝试过使用公共私有子网和 nat 网关来发送电子邮件,效果很好。但我正在尝试通过 VPC 端点使用它。我已经创建了一个电子邮件 vpc 端点,但不确定如何在 serverless.yml 中配置它。已尝试按照https://www.serverless.com/framework/docs/providers/aws/guide/serverless.yml/中所述设置配置
但没有任何作用,因为没有提到 ses。
macos 上mac Pritunl 错误的类似问题
尝试在 Windows 10 上打开 Pritunl VPN 工具时,我看到一个错误: Pritunl - Service Error [Content] Unable to communicate with helper service, try restarting computer.
尝试的解决方案:
从任务管理器中杀死所有 Pritunl 程序
重启电脑
卸载 Pritunl,重新启动电脑,再次安装(在这种情况下工作过一次,但在下次启动时显示错误)
重启windows服务
amazon-ses ×1
express ×1
google-oauth ×1
node.js ×1
passport.js ×1
pritunl ×1
serverless ×1
vpn ×1
windows ×1
windows-10 ×1