2013-12-10 83 views
1

它一直在正常工作一段时间,但现在我得到以下错误,找不到任何东西来弄清楚。Google+登录错误:invalid_request

当我点击Google登录时,我收到来自Google的此错误消息。

这是我的谷歌渲染()

function render() { 
gapi.signin.render('customBtn', { 
    'callback': 'onSignInCallback', 
    'clientid': '317162416761.apps.googleusercontent.com', 
    'cookiepolicy': 'single_host_origin', 
    'requestvisibleactions': 'http://schemas.google.com/AddActivity', 
    'scope': 'openid email profile' 
}); 

}

enter image description here

我现在也注意到,我得到一个400(坏请求)调用谷歌的oauth2

enter image description here

这是th e URL调用:https://accounts.google.com/o/oauth2/auth?client_id=317162416761.apps.googleusercontent.com&response_type=code%20token%20id_token%20gsession&scope=openid%20email%20profile&request_visible_actions=http%3A%2F%2Fschemas.google.com%2FAddActivity&cookie_policy=single_host_origin&immediate=true&proxy=oauth2relay720963522&redirect_uri=postmessage&origin=http%3A%2F%2Fmmaprophet.com&state=544595189%7C0.866765767&authuser=0

回答

4

看起来您似乎在将较旧的OAuth 2.0范围与较新的Google+功能混合在一起。更新到latest scopes应该工作。

  • https://www.googleapis.com/auth/plus.login
  • https://www.googleapis.com/auth/userinfo.email
+0

感谢百万时间。奇怪它用于以前工作。 – Yannick