Fix github login to use the github auth endpoint
This commit is contained in:
parent
c14368fc66
commit
b8785dfc04
1 changed files with 2 additions and 2 deletions
|
@ -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')
|
||||
|
|
Reference in a new issue