Skip to content

Commit

Permalink
oauth fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
wprzyb authored Mar 16, 2024
1 parent 6c31801 commit 2982726
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions auth/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ class HSWawOAuth2(BaseOAuth2):
def get_user_details(self, response):
"""Return user details from Hackerspace account"""
personal_email = None
if response.get("personal_email"):
personal_email = response.get("personal_email")[0]
if response.get("email"):
personal_email = response.get("email")

return {
"username": response.get("username"),
"username": response.get("preferred_username"),
"email": response.get("email"),
"personal_email": personal_email,
}
Expand Down

0 comments on commit 2982726

Please sign in to comment.