当尝试使用google -oauth登录时,将获得以下错误。
I, [2014-04-23T10:08:24.349056 #4905] INFO -- omniauth: (google_oauth2) Request phase initiated.
I, [2014-04-23T10:08:24.861288 #4905] INFO -- omniauth: (google_oauth2) Request phase initiated.
I, [2014-04-23T10:08:28.637438 #4905] INFO -- omniauth: (google_oauth2) Callback phase initiated.
E, [2014-04-23T10:08:30.207714 #4905] ERROR -- omniauth: (google_oauth2) Authentication failure! invalid_credentials: OAuth2::Error, {"errors"=>[{"domain"=>"usageLimits", "reason"=>"accessNotConfigured", "message"=>"Access Not Configured. Please use Google Developers Console to activate the API for your project."}], "code"=>403, "message"=>"Access Not Configured. Please use Google Developers Console to activate the API for your project."}:
{
"error": {
"errors": [
{
"domain": "usageLimits",
"reason": "accessNotConfigured",
"message": "Access Not Configured. Please use Google Developers Console to activate the API for your project."
}
],
"code": 403,
"message": "Access Not Configured. Please use Google Developers Console to activate the API for your project."
}
}发布于 2014-04-23 05:22:03
答案是在您的错误日志,激活Google在开发人员设置在您的帐户。
发布于 2014-10-10 10:24:53
我在谷歌搜索后发现了这个问题,我对@Babar的回答并不满意,因为它并没有真正解决我的问题。
经过大量研究之后,我发现您必须在开发人员控制台中启用Google+ API (也有人说,您需要Contacts API)。我以前没有必要这样做,但显然已经有了一些变化。
为此,请执行以下步骤:
Google+ API和Contacts APIWAIT ABOUT 5 MINUTES就可以启动API了。现在,您应该能够再次使用Oauth2登录。
发布于 2020-06-25 10:20:08
我也有一个类似的问题,我的Rails应用程序抛错误403。因此,我通过在终端中运行bundle update devise omniauth omniauth-google-oauth2来升级无所不在的宝石来解决这个问题。
https://stackoverflow.com/questions/23235064
复制相似问题