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

Useyes · December 14, 2013 · Last by ruohanc replied at December 14, 2013 · 2422 hits

在 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

You need to Sign in before reply, if you don't have an account, please Sign up first.