Skip to content

Commit

Permalink
fix: username when getting data from token
Browse files Browse the repository at this point in the history
  • Loading branch information
DejanStokic committed Sep 30, 2024
1 parent c5bf732 commit 3f06439
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/src/appointment/dependencies/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def get_flash_user_data_from_token(request):
print(payload_json)
print("________________________________")
flash_user_data = {
"username": payload_json["preferred_username"],
"username": payload_json["preferred_username"] if "preffered_username" in payload_json else payload_json["given_name"] + "." + payload_json["family_name"],
"email": payload_json["email"],
"name": payload_json["given_name"] + " " + payload_json["family_name"]
}
Expand Down

0 comments on commit 3f06439

Please sign in to comment.