diff --git a/social/backends/github.py b/social/backends/github.py index b41c0a4a4..18fdc678b 100644 --- a/social/backends/github.py +++ b/social/backends/github.py @@ -13,6 +13,7 @@ class GithubOAuth2(BaseOAuth2): name = 'github' AUTHORIZATION_URL = 'https://github.com/login/oauth/authorize' ACCESS_TOKEN_URL = 'https://github.com/login/oauth/access_token' + ACCESS_TOKEN_METHOD = 'POST' SCOPE_SEPARATOR = ',' EXTRA_DATA = [ ('id', 'id'), diff --git a/social/tests/actions/actions.py b/social/tests/actions/actions.py index 14a8f6495..9d81dc83b 100644 --- a/social/tests/actions/actions.py +++ b/social/tests/actions/actions.py @@ -110,7 +110,7 @@ def do_login(self, after_complete_checks=True, user_data_body=None, expect(response.url).to.equal(location_url) expect(response.text).to.equal('foobar') - HTTPretty.register_uri(HTTPretty.GET, + HTTPretty.register_uri(HTTPretty.POST, uri=self.backend.ACCESS_TOKEN_URL, status=200, body=self.access_token_body or '',