Skip to content

Commit

Permalink
Hotfix: Update username to be able to log in a second time
Browse files Browse the repository at this point in the history
Due to the migration, the claims contain changed usernames and email addresses. However, only the new email address was preserved.
Therefore, the account was not found during a second log in.
  • Loading branch information
lukasrad02 committed Dec 20, 2023
1 parent 46dcf72 commit 52a97ec
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions myhpi/core/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def create_user(self, claims):
return user

def update_user(self, user, claims):
user.username = claims.get("sub")
user.email = claims.get("email")
user.first_name = claims.get("given_name", "")
user.last_name = claims.get("family_name", "")
Expand Down

0 comments on commit 52a97ec

Please sign in to comment.