You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2024-10-14] [$250] Sign in–Magic code expired appears briefly if use Request one here link & login via magic link #47883
@greg-schroeder FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors
This condition returns true even when shouldStartSignInWithValidateCode is true. This caused the ValidateCodeModal to be shown to the user.
What changes do you think we should make in order to solve the problem?
By changing the condition to !shouldStartSignInWithValidateCode && autoAuthState === CONST.AUTO_AUTH_STATE.NOT_STARTED && !exitTo
By this we can prevent the display ValidateCodeModal, and we can display the Loading Indicator instead of the ValidateCodeModal including it in the condition for FullScreenLoadingIndicator.
I suggest making the changes as follows:
// If session.autoAuthState isn't available yet, we use shouldStartSignInWithValidateCode to conditionally render the component instead of local autoAuthState which contains a default value of NOT_STARTEDconstshouldValidateModal=!shouldStartSignInWithValidateCode&&autoAuthState===CONST.AUTO_AUTH_STATE.NOT_STARTED&&!exitTo;constisFailed=autoAuthState===CONST.AUTO_AUTH_STATE.FAILED;constisJustSignedIn2FA=autoAuthState===CONST.AUTO_AUTH_STATE.JUST_SIGNED_IN&&is2FARequired&&!isSignedIn&&login;constisJustSignedIn=autoAuthState===CONST.AUTO_AUTH_STATE.JUST_SIGNED_IN&&isSignedIn&&!exitTo&&login;return(<>{isFailed&&<ExpiredValidateCodeModal/>}{isJustSignedIn2FA&&<JustSignedInModalis2FARequired/>}{isJustSignedIn&&<JustSignedInModalis2FARequired={false}/>}{shouldValidateModal&&(<ValidateCodeModalaccountID={Number(accountID)}code={validateCode}/>)}{!shouldValidateModal&&!isJustSignedIn&&!isJustSignedIn2FA&&<FullScreenLoadingIndicator/>}</>);
changed the title [-]Sign in–Magic code expired appears briefly if use Request one here link & login via magic link[/-][+][$250] Sign in–Magic code expired appears briefly if use Request one here link & login via magic link[/+]on Aug 27, 2024
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
[@parasharrajat] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion: NA
[@parasharrajat] Determine if we should create a regression test for this bug. Yes
[@parasharrajat] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
Regression Test Steps
Log out from the app
Enter your login once
Go back
Enter your login again. Verify you receive 2 magic code & link emails
changed the title [-][HOLD for payment 2024-10-14] [HOLD for payment 2024-10-11] [$250] Sign in–Magic code expired appears briefly if use Request one here link & login via magic link[/-][+][HOLD for payment 2024-10-14] [$250] Sign in–Magic code expired appears briefly if use Request one here link & login via magic link[/+]on Oct 11, 2024
Activity
melvin-bot commentedon Aug 22, 2024
Triggered auto assignment to @greg-schroeder (
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.IuliiaHerets commentedon Aug 22, 2024
@greg-schroeder FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors
Amoralchik commentedon Aug 23, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
The user sees the
ValidateCodeModalinstead of a loading screen when accessing the magic link.What is the root cause of that problem?
Here in ValidateLoginPage:
App/src/pages/ValidateLoginPage/index.website.tsx
Line 77 in 844c6bf
This condition returns
trueeven whenshouldStartSignInWithValidateCodeistrue. This caused theValidateCodeModalto be shown to the user.What changes do you think we should make in order to solve the problem?
By changing the condition to
!shouldStartSignInWithValidateCode && autoAuthState === CONST.AUTO_AUTH_STATE.NOT_STARTED && !exitToBy this we can prevent the display
ValidateCodeModal, and we can display the Loading Indicator instead of theValidateCodeModalincluding it in the condition forFullScreenLoadingIndicator.I suggest making the changes as follows:
melvin-bot commentedon Aug 26, 2024
@greg-schroeder Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
[-]Sign in–Magic code expired appears briefly if use Request one here link & login via magic link[/-][+][$250] Sign in–Magic code expired appears briefly if use Request one here link & login via magic link[/+]melvin-bot commentedon Aug 27, 2024
Job added to Upwork: https://www.upwork.com/jobs/~015ba582e21228c322
melvin-bot commentedon Aug 27, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @parasharrajat (
External)57 remaining items
bernhardoj commentedon Oct 9, 2024
Requested in ND.
parasharrajat commentedon Oct 9, 2024
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
Regression Test Steps
Do you agree 👍 or 👎 ?
greg-schroeder commentedon Oct 11, 2024
Oops - regression period is actually 10/14 because the 10/11 date is for the Onyx bump PR, not the PR that fixes this. Updated
[-][HOLD for payment 2024-10-14] [HOLD for payment 2024-10-11] [$250] Sign in–Magic code expired appears briefly if use Request one here link & login via magic link[/-][+][HOLD for payment 2024-10-14] [$250] Sign in–Magic code expired appears briefly if use Request one here link & login via magic link[/+]melvin-bot commentedon Oct 14, 2024
Payment Summary
Upwork Job
BugZero Checklist (@greg-schroeder)
greg-schroeder commentedon Oct 14, 2024
All right, these manual requests can be approved per #47883 (comment)
greg-schroeder commentedon Oct 14, 2024
Adding regression test, closing!
JmillsExpensify commentedon Oct 15, 2024
$250 approved for @bernhardoj
parasharrajat commentedon Dec 12, 2024
Payment requested as per #47883 (comment)
JmillsExpensify commentedon Dec 16, 2024
$250 approved for @parasharrajat