-
Notifications
You must be signed in to change notification settings - Fork 185
FIX: Inconsistency in User Verification Status between Email and Phone Number & Password Field Not Reset On Email Update #2115
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
base: main
Are you sure you want to change the base?
Changes from 8 commits
31fc87b
8c99e6c
288c76b
f2c57a3
5f461ee
94fa347
f1db6e3
f9778df
c0a90ee
2225746
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -22,9 +22,10 @@ | |||||||||
.forProject(page.params.region, page.params.project) | ||||||||||
.users.updateEmailVerification($user.$id, !$user.emailVerification); | ||||||||||
await invalidate(Dependencies.USER); | ||||||||||
|
||||||||||
addNotification({ | ||||||||||
message: `${$user.name || $user.email || $user.phone || 'The account'} has been ${ | ||||||||||
!$user.emailVerification ? 'unverified' : 'verified' | ||||||||||
message: `The email${$user.name && ` for ${$user.name}`} ${ | ||||||||||
!$user.emailVerification ? 'is no longer verified' : ' has been verified' | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [nitpick] The leading space on the 'has been verified' branch combined with the preceding template space can result in double spaces. Move spacing outside the conditional or remove the extra leading space for consistency.
Suggested change
Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ooops, small leading space there. I think this is not intentional, right? @Joyal-George-KJ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this can be simplified for readability. |
||||||||||
}`, | ||||||||||
type: 'success' | ||||||||||
}); | ||||||||||
|
@@ -44,9 +45,10 @@ | |||||||||
.forProject(page.params.region, page.params.project) | ||||||||||
.users.updatePhoneVerification($user.$id, !$user.phoneVerification); | ||||||||||
await invalidate(Dependencies.USER); | ||||||||||
|
||||||||||
addNotification({ | ||||||||||
message: `${$user.name || $user.email || $user.phone || 'The account'} has been ${ | ||||||||||
$user.phoneVerification ? 'unverified' : 'verified' | ||||||||||
message: `The phone ${$user[$user.name ? 'name' : 'email'] && `for ${$user[$user.name ? 'name' : 'email']}`}${ | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The dynamic property guard here may insert
Suggested change
Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||||||||||
!$user.phoneVerification ? ' is no longer verified' : ' has been verified' | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [nitpick] Similarly here, both branches include a leading space—consider unifying whitespace handling outside the conditional to prevent inconsistent spacing in the final message.
Suggested change
Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same here. |
||||||||||
}`, | ||||||||||
type: 'success' | ||||||||||
}); | ||||||||||
|
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.
Using
$user.name &&
inside a template literal can yieldundefined
ifname
is falsy. Consider using a ternary:${$user.name ?
for ${$user.name}: ''}
to avoid inserting “undefined.”Copilot uses AI. Check for mistakes.
Uh oh!
There was an error while loading. Please reload this page.
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.
It's an empty string by default, so not needed