Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: normalise sgid email #388

Merged
merged 2 commits into from
Jan 6, 2025
Merged

fix: normalise sgid email #388

merged 2 commits into from
Jan 6, 2025

Conversation

zhongliang02
Copy link
Contributor

@zhongliang02 zhongliang02 commented Jan 3, 2025

Context

After sgid login, the user is prompted to select a profile.
Whichever profile is selected, the email is sent to the server to be used as the primary identifier.
There is a validation step which checks that the email used is in one of the sgid profiles belonging to the user.
However, there is no case normalization performed on the sgid profile emails during this check.

Therefore, there could be a situation where the sgid profile emails are not lowercased, leading to an error when the user selects the profile.

Approach

Normalize the work_email when checking if the user selected email is equal to it.

Additionally, the check for whether sgid login is enabled has been made consistent.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Copy link

vercel bot commented Jan 3, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
starter-kit ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 3, 2025 11:49am

@datadog-opengovsg
Copy link

datadog-opengovsg bot commented Jan 3, 2025

Datadog Report

Branch report: 01-03-fix_normalise_sgid_email
Commit report: 65e1157
Test service: starter-kit

✅ 0 Failed, 11 Passed, 0 Skipped, 11.78s Total Time
➡️ Test Sessions change in coverage: 1 no change

@zhongliang02 zhongliang02 requested a review from karrui January 3, 2025 11:57
@karrui karrui merged commit 5593894 into main Jan 6, 2025
14 checks passed
@karrui karrui deleted the 01-03-fix_normalise_sgid_email branch January 6, 2025 01:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants