Fix github login to use the github auth endpoint

This commit is contained in:
Joseph Schorr 2015-05-01 12:58:50 -04:00
parent c14368fc66
commit b8785dfc04

View file

@ -126,7 +126,7 @@ def github_oauth_callback():
# Exchange the OAuth code.
code = request.args.get('code')
token = google_login.exchange_code_for_token(app.config, client, code)
token = github_login.exchange_code_for_token(app.config, client, code)
# Retrieve the user's information.
user_data = get_user(github_login, token)
@ -214,7 +214,7 @@ def google_oauth_attach():
@require_session_login
def github_oauth_attach():
code = request.args.get('code')
token = google_login.exchange_code_for_token(app.config, client, code)
token = github_login.exchange_code_for_token(app.config, client, code)
user_data = get_user(github_login, token)
if not user_data:
return render_ologin_error('GitHub')