Skip to content

Commit

Permalink
feat: lover case of the emails before comparsion
Browse files Browse the repository at this point in the history
  • Loading branch information
EreminAnton committed Oct 4, 2024
1 parent ad63af8 commit 857c0d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sso.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ def get_user_principal_id_by_email(client: IdentityStoreClient, identity_store_i
response = list_users(client, identity_store_id=identity_store_id)
for user in response["Users"]:
for user_email in user.get("Emails", []):
if user_email.get("Value") == email:
if user_email.get("Value", "").lower() == email.lower():
return user["UserId"]

raise errors.NotFound(f"AWS SSO User with email {email} not found")
Expand Down

0 comments on commit 857c0d0

Please sign in to comment.