Skip to content

Commit

Permalink
fix: Prefer username over email
Browse files Browse the repository at this point in the history
  • Loading branch information
worldbeater authored Mar 4, 2024
1 parent 6832dad commit 0dad19d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion webapp/views/student.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ def login_with_lks_callback():
response = oauth.fetch_token(token_ep, authorization_response=request.url)
access_token = response['access_token']
info = requests.get(userinfo_ep, headers={'Authorization': f'Bearer {access_token}'}).json()
email = info['email']
email = info['username']
if not email:
return redirect("/")
student = db.students.get_by_external_email(email, 'lks')
Expand Down

0 comments on commit 0dad19d

Please sign in to comment.