Open IuliiaHerets opened 1 day ago
Triggered auto assignment to @sakluger (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.
Job added to Upwork: https://www.upwork.com/jobs/~021859629436988834132
Triggered auto assignment to Contributor-plus team member for initial proposal review - @akinwale (External
)
Edited by proposal-police: This proposal was edited at 2024-11-21 18:05:48 UTC.
The email field error appears after successfully signing in with an Apple account
When we click the Apple icon, a popup appears that prevents the onBlur
of the TextInput
from being executed. When we return to the Expensify app, the onBlur
is executed and validates with the login value as ''
.
https://github.com/user-attachments/assets/53b86695-1933-425b-abe3-e28c70bbf100
The reason validate(login);
is executed is that isSigningWithAppleOrGoogle.current
is not updated to true
for desktop web, so the early return is not triggered.
isSigningWithAppleOrGoogle.current
is not updated to true
because we did not add the onPress
handler for the desktop web version
To resolve this issue, we must call onPress
when AppleSignIn
is clicked so that isSigningWithAppleOrGoogle.current
can be updated. This allows the onBlur
to return early without calling validate(login);
. Something like this:
We pass the onPress prop from BaseLoginForm to AppleSignInDiv and add an event listener for the click to call onPress
// src/components/SignInButtons/AppleSignIn/index.tsx#L83
React.useEffect(() => {
const appleSignInButton = document.getElementById('appleid-signin');
if (!appleSignInButton && !isDesktopFlow) {
return;
}
appleSignInButton?.addEventListener('click', () => {
onPress?.();
});
return () => {
appleSignInButton?.removeEventListener('click', () => {
onPress?.();
});
};
});
note: If Google Sign-In has the same issue, we can reuse this solution
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: v9.0.65-1 Reproducible in staging?: Y Reproducible in production?: Y If this was caught during regression testing, add the test name, ID and link from TestRail: Issue reported by: Applause Internal Team
Action Performed:
Expected Result:
The user is logged correctly into NewDot, no errors are displayed,
Actual Result:
The email field error appears after successfully signing in with an Apple account
Workaround:
Unknown
Platforms:
Screenshots/Videos
https://github.com/user-attachments/assets/2086417a-a44a-4068-98d2-c50c6a18d968
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @akinwale