{"action":"closed","issue":{"url":"https://api.github.com/repos/nijel/weblate/issues/683","labels_url":"https://api.github.com/repos/nijel/weblate/issues/683/labels{/name}","comments_url":"https://api.github.com/repos/nijel/weblate/issues/683/comments","events_url":"https://api.github.com/repos/nijel/weblate/issues/683/events","html_url":"https://github.com/nijel/weblate/issues/683","id":64723159,"number":683,"title":"Google OpenId deprecated, oAuth2 not working","user":{"login":"phw","id":29852,"avatar_url":"https://avatars.githubusercontent.com/u/29852?v=3","gravatar_id":"","url":"https://api.github.com/users/phw","html_url":"https://github.com/phw","followers_url":"https://api.github.com/users/phw/followers","following_url":"https://api.github.com/users/phw/following{/other_user}","gists_url":"https://api.github.com/users/phw/gists{/gist_id}","starred_url":"https://api.github.com/users/phw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phw/subscriptions","organizations_url":"https://api.github.com/users/phw/orgs","repos_url":"https://api.github.com/users/phw/repos","events_url":"https://api.github.com/users/phw/events{/privacy}","received_events_url":"https://api.github.com/users/phw/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nijel/weblate/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":{"login":"nijel","id":212189,"avatar_url":"https://avatars.githubusercontent.com/u/212189?v=3","gravatar_id":"","url":"https://api.github.com/users/nijel","html_url":"https://github.com/nijel","followers_url":"https://api.github.com/users/nijel/followers","following_url":"https://api.github.com/users/nijel/following{/other_user}","gists_url":"https://api.github.com/users/nijel/gists{/gist_id}","starred_url":"https://api.github.com/users/nijel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nijel/subscriptions","organizations_url":"https://api.github.com/users/nijel/orgs","repos_url":"https://api.github.com/users/nijel/repos","events_url":"https://api.github.com/users/nijel/events{/privacy}","received_events_url":"https://api.github.com/users/nijel/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/nijel/weblate/milestones/15","html_url":"https://github.com/nijel/weblate/milestones/2.3","labels_url":"https://api.github.com/repos/nijel/weblate/milestones/15/labels","id":986660,"number":15,"title":"2.3","description":"","creator":{"login":"nijel","id":212189,"avatar_url":"https://avatars.githubusercontent.com/u/212189?v=3","gravatar_id":"","url":"https://api.github.com/users/nijel","html_url":"https://github.com/nijel","followers_url":"https://api.github.com/users/nijel/followers","following_url":"https://api.github.com/users/nijel/following{/other_user}","gists_url":"https://api.github.com/users/nijel/gists{/gist_id}","starred_url":"https://api.github.com/users/nijel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nijel/subscriptions","organizations_url":"https://api.github.com/users/nijel/orgs","repos_url":"https://api.github.com/users/nijel/repos","events_url":"https://api.github.com/users/nijel/events{/privacy}","received_events_url":"https://api.github.com/users/nijel/received_events","type":"User","site_admin":false},"open_issues":9,"closed_issues":14,"state":"open","created_at":"2015-02-19T13:13:58Z","updated_at":"2015-03-27T10:17:58Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2015-03-27T09:03:58Z","updated_at":"2015-03-27T10:17:58Z","closed_at":"2015-03-27T10:17:58Z","body":"The default Google OpenID provider in Weblate 2.2 stopped working on new hosts since Google deprecated OpenID and does not provide it for new hosts.\r\n\r\nI tried following the Python Social Auth documentation to setup Google oAuth 2 (see http://psa.matiasaguirre.net/docs/backends/google.html), but it does only work partially. My configuration:\r\n\r\n```\r\nAUTHENTICATION_BACKENDS = ('social.backends.google.GoogleOAuth2', 'social.backends.email.EmailAuth', 'weblate.accounts.auth.WeblateUserBackend')\r\nSOCIAL_AUTH_GOOGLE_OAUTH2_KEY = 'My Client ID'  ###\r\nSOCIAL_AUTH_GOOGLE_OAUTH2_SECRET = 'My Client Secret'  ###\r\n```\r\n\r\nThe authentication process can be started (I have a button labeled \"google-oauth2\" in weblate, not pretty but would do the job), I see the Google consent screen, but upon redirection back to weblate the server fails with the following error message:\r\n\r\n```\r\nInternal Server Error: /accounts/complete/google-oauth2/\r\nTraceback (most recent call last):\r\n  File \"/var/lib/openshift/5513fe21fcf933bd31000027/python/virtenv/lib/python2.7/site-packages/django/core/handlers/base.py\", line 111, in get_response\r\n    response = wrapped_callback(request, *callback_args, **callback_kwargs)\r\n  File \"/var/lib/openshift/5513fe21fcf933bd31000027/python/virtenv/lib/python2.7/site-packages/django/views/decorators/cache.py\", line 52, in _wrapped_view_func\r\n    response = view_func(request, *args, **kwargs)\r\n  File \"/var/lib/openshift/5513fe21fcf933bd31000027/python/virtenv/lib/python2.7/site-packages/django/views/decorators/csrf.py\", line 57, in wrapped_view\r\n    return view_func(*args, **kwargs)\r\n  File \"/var/lib/openshift/5513fe21fcf933bd31000027/python/virtenv/lib/python2.7/site-packages/social/apps/django_app/utils.py\", line 52, in wrapper\r\n    return func(request, backend, *args, **kwargs)\r\n  File \"/var/lib/openshift/5513fe21fcf933bd31000027/python/virtenv/lib/python2.7/site-packages/social/apps/django_app/views.py\", line 28, in complete\r\n    redirect_name=REDIRECT_FIELD_NAME, *args, **kwargs)\r\n  File \"/var/lib/openshift/5513fe21fcf933bd31000027/python/virtenv/lib/python2.7/site-packages/social/actions.py\", line 40, in do_complete\r\n    user = backend.complete(user=user, *args, **kwargs)\r\n  File \"/var/lib/openshift/5513fe21fcf933bd31000027/python/virtenv/lib/python2.7/site-packages/social/backends/base.py\", line 40, in complete\r\n    return self.auth_complete(*args, **kwargs)\r\n  File \"/var/lib/openshift/5513fe21fcf933bd31000027/python/virtenv/lib/python2.7/site-packages/social/backends/oauth.py\", line 379, in auth_complete\r\n    *args, **kwargs)\r\n  File \"/var/lib/openshift/5513fe21fcf933bd31000027/python/virtenv/lib/python2.7/site-packages/social/backends/oauth.py\", line 383, in do_auth\r\n    data = self.user_data(access_token, *args, **kwargs)\r\n  File \"/var/lib/openshift/5513fe21fcf933bd31000027/python/virtenv/lib/python2.7/site-packages/social/backends/google.py\", line 74, in user_data\r\n    'alt': 'json'\r\n  File \"/var/lib/openshift/5513fe21fcf933bd31000027/python/virtenv/lib/python2.7/site-packages/social/backends/base.py\", line 228, in get_json\r\n    return self.request(url, *args, **kwargs).json()\r\n  File \"/var/lib/openshift/5513fe21fcf933bd31000027/python/virtenv/lib/python2.7/site-packages/social/backends/base.py\", line 224, in request\r\n    response.raise_for_status()\r\n  File \"/var/lib/openshift/5513fe21fcf933bd31000027/python/virtenv/lib/python2.7/site-packages/requests/models.py\", line 834, in raise_for_status\r\n    raise HTTPError(http_error_msg, response=self)\r\nHTTPError: 403 Client Error: Forbidden\r\n\r\nRequest repr(): \r\n<WSGIRequest\r\npath:/accounts/complete/google-oauth2/,\r\nGET:<QueryDict: {u'num_sessions': [u'3'], u'code': [u'4/yn2LPjPSq7uKUvPpQ6O-QntAU2d_4dy0YDHG5CViuMw.EvOleB5fDo0Yyjz_MlCJoi0C69m0mAI'], u'prompt': [u'consent'], u'session_state': [u'4c5a277f8c0f83f0a1ebb1b782b227fce5e86333..3c87'], u'state': [u'XSkDC7zF9jziT6QxIIvvmjrZxWDxuBJp'], u'authuser': [u'0']}>,\r\nPOST:<QueryDict: {}>,\r\n...\r\n```\r\n\r\nIs there some special support in Weblate required for this to work?\r\n\r\n\r\n\r\n<bountysource-plugin>\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/10077570-google-openid-deprecated-oauth2-not-working?utm_campaign=plugin&utm_content=tracker%2F253393&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F253393&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"}}