From 52a97ecf5fa1fccad0a3a272b83806f8b1f75de4 Mon Sep 17 00:00:00 2001 From: Lukas Radermacher <49586507+lukasrad02@users.noreply.github.com> Date: Wed, 20 Dec 2023 14:40:51 +0100 Subject: [PATCH] Hotfix: Update username to be able to log in a second time 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. --- myhpi/core/auth.py | 1 + 1 file changed, 1 insertion(+) diff --git a/myhpi/core/auth.py b/myhpi/core/auth.py index 228b2c3d..d9803f0d 100644 --- a/myhpi/core/auth.py +++ b/myhpi/core/auth.py @@ -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", "")