新手问题 使用 omniauth-github 出现 Faraday::Error

Useyes · 2013年12月14日 · 最后由 ruohanc 回复于 2013年12月14日 · 2436 次阅读

在 devise.rb 中设置

config.omniauth :github, 'xx', 'xx'

返回信息的时候出现:

Faraday::Error::ConnectionFailed

403 "Forbidden"

有人知道怎么回事吗?

HTTP CODE 403: RFC2616

10.4.4 403 Forbidden The server understood the request, but is refusing to fulfill it. Authorization will not help and the request SHOULD NOT be repeated. If the request method was not HEAD and the server wishes to make public why the request has not been fulfilled, it SHOULD describe the reason for the refusal in the entity. If the server does not wish to make this information available to the client, the status code 404 (Not Found) can be used instead.

我没用过 omniauth-github, 但是你应该是填错字段了。403 说明通过了 authentication, 但是没通过 authorization

需要 登录 后方可回复, 如果你还没有账号请 注册新账号