Node.js主机名/ IP不匹配证书的altnames [英] Node.js hostname/IP doesnt match certificates altnames

查看:5515
本文介绍了Node.js主机名/ IP不匹配证书的altnames的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在写一些节点代码来做一个服务器端登录Facebook。我很接近让它完全正常,但我有麻烦请求auth_code。
我认为这可能与facebook应用程序设置网站URL 有关,但没有我试过的工作。
我使用节点版本0.8.14。

I'm writing some node code to do a server side login to Facebook. I'm pretty close to having it completely functioning, but I am having troubles requesting the auth_code. I'm thinking it might have something to do with the facebook app setting Site URL but nothing I've tried has worked. I'm using node version 0.8.14.

这是我在我的请求中执行的代码:

Here is the code I do my request in:

options =
    host: 'graph.facebook.com'
    port: 443
    path: "/oauth/access_token?" + qs.stringify(
        client_id:     app_id
        redirect_uri:  my_url
        client_secret: app_secret
        code:          vars.code)

https.get(options, (face_res)->
    console.log face_res
)

face_res 我得到一些对象像这样:

In the face_res I get a couple of objects like this:

authorizationError: 'Hostname/IP doesn\'t match certificate\'s altnames'

推荐答案

好的事情是我得到的错误是完全不相关的。一旦我添加了一个 request.on(data,function(data){})事件监听器,我能够看到,我收到 auth_token

Ok funny thing is the error I was getting was completely irrelevant. As soon as I added a request.on("data", function(data){}) event listener I was able to see that I was receiving the auth_token as expected.

这篇关于Node.js主机名/ IP不匹配证书的altnames的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆