在使用nodejs passport来集成第三方平台时,发生InternalOAuthError
我想使用护照(使用paasport-facebook和QQ)来validation用户。 但遇到以下错误:当我使用Facebook身份validation:
error when auth: { [InternalOAuthError: Failed to obtain access token] name: 'InternalOAuthError', message: 'Failed to obtain access token', oauthError: [Error: Hostname/IP doesn't match certificate's altnames] }
当我使用QQ身份validation,我得到这个:
name: 'InternalOAuthError', message: 'failed to obtain access token', oauthError: [Error: CERT_UNTRUSTED] }
这是我的/ etc / hosts文件:
127.0.0.1 www.siyee.org 127.0.0.1 localhost 255.255.255.255 broadcasthost ::1 localhost
因为authcallback必须是域名,所以我改变了我的开发环境中的主机,以匹配Facebook服务器上的callback设置。它不是很聪明,但可以生效。任何更好的主意?
我认为这个问题是在我的主机设置或证书,但我不知道如何解决它,任何forms的帮助将是伟大的!
首先,我必须指定访问userinfo
,然后才能指定其他必要的服务。
scope: [ 'https://www.googleapis.com/auth/userinfo.profile', 'https://www.googleapis.com/auth/userinfo.email', 'https://www.googleapis.com/auth/youtube' ]
- 如何区分Facebook的评论和从Facebook的API返回的答复?
- 在PhoneGap应用上执行授权(通过脸书)REST请求到我的node.js服务器
- MEAN堆栈Facebook授权错误:没有“访问控制允许来源”标题?
- 使用passport-google-oauth2与Facebook和Google进行身份validation
- 发布到使用facebook nodejs sdk:OAuthException组
- NodeJS,Facebook API,Xcode
- 我得到的消息:“(#100)没有find匹配的用户”,当使用facebook messenger bot示例教程代码
- 使用facebook-node-sdk模块/(#324)上传照片需要上传文件
- 什么是正确的方式做facebooklogin移动应用程序(与node.js / passport.js服务器)