在使用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' ]
- 如何在匿名函数中应用node.js REPL?
- 没有'Access-Control-Allow-Origin'标题问题与hapijs
- 在Express和Passport之间检测Cookie
- 从facebook使用nodejs和expression所有的相册
- 节点Restify发回一个整数?
- 使用passport-google-oauth2与Facebook和Google进行身份validation
- passport.js,在popup窗口中进行身份validation后,closures它并redirect父窗口
- Parse.com:你如何获得本地运行的Node.js服务器上的当前用户?
- 如何通过个人消息回复页面发表评论 – api.ai chatbot