2015-11-08 138 views
5

我在application.yml中添加了clientID和clientSecret(在Google Developer Console中創建),但我無法正常工作。任何想法是什麼導致錯誤400.錯誤:redirect_uri_mismatch。我在授權的JavaScript起源中獲得了http://127.0.0.1:8080Jhipster通過Google進行社交登錄

我所做的一切什麼是谷歌的教程說,但沒有運氣:

https://developers.google.com/identity/sign-in/web/server-side-flow#step_1_create_a_client_id_and_client_secret

回答

6

你需要指定你的谷歌開發者控制檯中的不同重定向URL您授權。對於您,您需要添加http://127.0.0.1:8080網址。

小政黨成員:

  1. 連接到您的開發者控制檯,點擊一個主菜單

enter image description here

  • 選擇API管理
  • enter image description here

  • 轉到Identifiant並選擇應用程序,這裏JHipster
  • enter image description here

  • 並添加你的網址並保存
  • enter image description here

    2

    另一件我不得不做的事情在谷歌開發者鏈接中沒有清楚提及的是啓用Google+ API。

    可通過儀表板下的庫選項卡訪問各種API。