3

嘗試使用google -oauth登錄時出現以下錯誤。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." 
} 
} 

回答

7

答案出現在您的錯誤日誌中,在您的帳戶的開發者設置中激活Google API。

+0

要做什麼的鏈接是什麼? –

+0

哪裏是鏈接? – gonephishing

+0

Google Developers Console位於https://console.developers.google.com/project?authuser=0 – aqn

5

我發現這個問題後,一些谷歌搜索,我不是很滿意@ Babar的答案,因爲它ID實際上並沒有解決我的問題。

經過大量挖的身邊,我發現,你必須讓你的開發者控制檯Google+ APIsome also say您需要的Contacts API)。我以前不必這樣做,但顯然有一些變化。

要做到這一點,請執行下列操作步驟:

  1. 轉到https://console.developers.google.com/project
  2. 從側面板中選擇項目
  3. 按「API的&權威性」從
  4. 按下「的API」下拉菜單
  5. 查找並啓用Google+ APIContacts API
  6. Af之三已啓用,WAIT ABOUT 5 MINUTES的API來一命嗚呼。

現在你應該可以再次使用的OAuth2登錄。

+1

爲我工作,upvoted –

+0

這是更好的答案...謝謝最後,我已經與設計工作oauth2 –