-
Notifications
You must be signed in to change notification settings - Fork 971
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
Patch fix for issues caused by adding type check in #5906 #5987
Conversation
@@ -198,13 +198,13 @@ async function signUp( | |||
} | |||
} | |||
|
|||
if (typeof reqBody.email === "string") { | |||
if (reqBody.email || (reqBody.email === "" && provider)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: add a comment here describing the conditions that we're testing for and why
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a comment describing the additional condition
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #5987 +/- ##
=======================================
Coverage 55.02% 55.02%
=======================================
Files 339 339
Lines 23222 23222
Branches 4747 4747
=======================================
Hits 12779 12779
Misses 9313 9313
Partials 1130 1130
☔ View full report in Codecov by Sentry. |
Closing this PR, changes are fixed in #6127 |
Pull request was closed
Description
Type checking
reqBody.email
andreqBody.password
introduced in #5906 caused some issues with the Auth Emulator UI.Request made by the emulator UI ofter contain a blank values by default. Creating a user via the Emulator UI using phone number will provide a blank email and password string. This will result in the request received by the Auth Emulator to look like:
Adding type checking of
reqBody.email
andreqBody.password
causes the emulator to always assert a valid email address value. Proposed solution is to remove type check for bothreqBody.email
andreqBody.password
.To keep the solution in #5906, add a condition to specifically check if
reqBody.email
is an empty string and a provider is defined(reqBody.email === "" && provider)
.Scenarios Tested
Emulator UI