Skip to content

Commit

Permalink
dont clear names on missing oidc claims
Browse files Browse the repository at this point in the history
  • Loading branch information
felixrindt committed Oct 1, 2023
1 parent af98f8a commit 5baa299
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ephios/extra/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ def create_user(self, claims):
return user

def update_user(self, user, claims):
user.first_name = claims.get("given_name", "")
user.last_name = claims.get("family_name", "")
if "given_name" in claims:
user.first_name = claims["given_name"]
if "family_name" in claims:
user.last_name = claims["family_name"]
user.save()

return user

0 comments on commit 5baa299

Please sign in to comment.