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

[HOLD for payment 2024-08-05] Update the magic code expired page to include a link to take user to login page #45242

Closed
techievivek opened this issue Jul 11, 2024 · 22 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor FirstPick Engineering only, please! Only add when there is an identified code solution.

Comments

@techievivek
Copy link
Contributor

techievivek commented Jul 11, 2024

This is how the magic code sign-in page currently looks when you validate via link from the email.
Screenshot 2024-06-07 at 12 50 50 PM

It includes a link to allow users to log in on the same device. However, the magic code expiration page lacks this convenience. Users must manually change the URL to initiate a sign-in.

To improve the user experience, please update the magic code expiration page to include a link that redirects the user back to the sign-in page.

Screenshot 2024-06-07 at 12 51 05 PM

This issue was discussed internally here: Slack Discussion

Copy for verification

Go back to the original device and request a new code or request one here

request one here can be used as hyperlink to take user to sign-in page.

@techievivek techievivek added External Added to denote the issue can be worked on by a contributor Daily KSv2 FirstPick Engineering only, please! Only add when there is an identified code solution. Bug Something is broken. Auto assigns a BugZero manager. labels Jul 11, 2024
@techievivek techievivek self-assigned this Jul 11, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jul 11, 2024
Copy link

melvin-bot bot commented Jul 11, 2024

Triggered auto assignment to Contributor-plus team member for initial proposal review - @ZhenjaHorbach (External)

Copy link

melvin-bot bot commented Jul 11, 2024

Triggered auto assignment to @anmurali (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.

@devguest07
Copy link
Contributor

Proposal

Please re-state the problem that we are trying to solve in this issue.

Update the magic code expired page to include a link to take user to login page

What is the root cause of that problem?

New feature

What changes do you think we should make in order to solve the problem?

on ExpiredValidateCodeModal add a link <TextLink onPress={goToSignIn}v ... that redirect the user the signin page

<Text style={styles.textAlignCenter}>{translate('validateCodeModal.expiredCodeDescription')}</Text>

We can use the Session.signOutAndRedirectToSignIn() as used on the AnonymousReportFooter

onPress={() => Session.signOutAndRedirectToSignIn()}

What alternative solutions did you explore?

@nkdengineer
Copy link
Contributor

nkdengineer commented Jul 11, 2024

Proposal

Please re-state the problem that we are trying to solve in this issue.

Update the magic code expired page to include a link to take user to login page

What is the root cause of that problem?

New feature

What changes do you think we should make in order to solve the problem?

In

tfaRequiredDescription: "Please enter the two-factor authentication code\nwhere you're trying to sign in.",
, add a translation for request one here

requestOneHere: 'request one here',

And update translation for expiredCodeDescription to remove the ending dot.

In

const {translate} = useLocalize();
, get the credentials from Onyx

const [credentials] = useOnyx(ONYXKEYS.CREDENTIALS);

Next, update

<Text style={styles.textAlignCenter}>{translate('validateCodeModal.expiredCodeDescription')}</Text>
to

<Text style={styles.textAlignCenter}>
    {translate('validateCodeModal.expiredCodeDescription')}
    {translate('validateCodeModal.or')} <TextLink onPress={() => {
        Session.beginSignIn(credentials?.login);
        Navigation.goBack();
    }}>{translate('validateCodeModal.requestOneHere')}</TextLink>
</Text>

In there, we'll trigger sending the magic code again by calling Session.beginSignIn, this is what we also do when clicking Continue the first time here. Please note that requesting a new code is what we want, not clearing the account data, because the CTA here is request one here, the user wants a new magic code/email, they will not like to enter the email again and type in the code again (which is what will happen if we call sign out/clear sign in data)

And the Navigation.goBack will direct the user back to the sign in page, where they will see the magic code form to fill in the new code that they just received. (Alternatively we can navigate back to sign in page by other means like Navigation.navigate, ...)

The copy above can be changed depending on the design team's requirement.

What alternative solutions did you explore? (Optional)

@ZhenjaHorbach
Copy link
Contributor

ZhenjaHorbach commented Jul 11, 2024

@devguest07 @nkdengineer
Thank you for your proposals !

@devguest07
Unfortunately, your solution works a little unpredictable
After testing, I noticed that after pressing the text we return to the magic code sign-in page (with invalid magic code from route)

2024-07-11.15.20.24.mov

Plus signOutAndRedirectToSignIn doesn't really suit us
Since we don't need to sign out of our account
We need to return to the screen to request new code (following the requirements)

@nkdengineer
Your solution works well !
And meets the requirements
So I'm happy to go with this proposal

🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented Jul 11, 2024

Current assignee @techievivek is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Jul 15, 2024
@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Jul 16, 2024
Copy link

melvin-bot bot commented Jul 26, 2024

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Jul 29, 2024
@melvin-bot melvin-bot bot changed the title Update the magic code expired page to include a link to take user to login page [HOLD for payment 2024-08-05] Update the magic code expired page to include a link to take user to login page Jul 29, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jul 29, 2024
Copy link

melvin-bot bot commented Jul 29, 2024

Reviewing label has been removed, please complete the "BugZero Checklist".

Copy link

melvin-bot bot commented Jul 29, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.13-4 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2024-08-05. 🎊

For reference, here are some details about the assignees on this issue:

Copy link

melvin-bot bot commented Jul 29, 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:

  • [@ZhenjaHorbach] The PR that introduced the bug has been identified. Link to the PR:
  • [@ZhenjaHorbach] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
  • [@ZhenjaHorbach] 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:
  • [@ZhenjaHorbach] Determine if we should create a regression test for this bug.
  • [@ZhenjaHorbach] 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.
  • [@anmurali] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot removed the Weekly KSv2 label Aug 5, 2024
@melvin-bot melvin-bot bot added the Daily KSv2 label Aug 5, 2024
Copy link

melvin-bot bot commented Aug 5, 2024

Payment Summary

Upwork Job

BugZero Checklist (@anmurali)

  • I have verified the correct assignees and roles are listed above and updated the neccesary manual offers
  • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants//hired)
  • I have paid out the Upwork contracts or cancelled the ones that are incorrect
  • I have verified the payment summary above is correct

@ZhenjaHorbach
Copy link
Contributor

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:

  • [@ZhenjaHorbach] The PR that introduced the bug has been identified. Link to the PR:

New feature

  • [@ZhenjaHorbach] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:

NA

  • [@ZhenjaHorbach] 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

  • [@ZhenjaHorbach] Determine if we should create a regression test for this bug.
  • [@ZhenjaHorbach] 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 proposal

  • Login with email
  • Copy the link from 'click this magic link' in your email
  • Wait for the link to expire
  • Verify that request one here is displayed on expired page

Do we agree 👍 or 👎

@melvin-bot melvin-bot bot added the Overdue label Aug 7, 2024
@ZhenjaHorbach
Copy link
Contributor

Not overdue
Waiting for payment

@techievivek
Copy link
Contributor Author

Not overdue, waiting for the payment to be done.

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Aug 8, 2024
@ZhenjaHorbach
Copy link
Contributor

Not overdue

@anmurali
Could you please make the payment ?

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Aug 12, 2024
@techievivek
Copy link
Contributor Author

Not overdue, still waiting on payment.

@melvin-bot melvin-bot bot removed the Overdue label Aug 15, 2024
@anmurali
Copy link

@ZhenjaHorbach - https://www.upwork.com/nx/wm/offer/103567268
@nkdengineer -https://www.upwork.com/nx/wm/offer/103567272

@melvin-bot melvin-bot bot added the Overdue label Aug 19, 2024
@nkdengineer
Copy link
Contributor

@anmurali My offer was accepted 🙇

@melvin-bot melvin-bot bot removed the Overdue label Aug 20, 2024
@ZhenjaHorbach
Copy link
Contributor

My offer was accepte

and mine too

@melvin-bot melvin-bot bot added the Overdue label Aug 22, 2024
@ZhenjaHorbach
Copy link
Contributor

Not overdue

@anmurali
We are ready to payment !

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Aug 23, 2024
Copy link

melvin-bot bot commented Aug 26, 2024

@anmurali, @techievivek, @ZhenjaHorbach, @nkdengineer Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@anmurali
Copy link

Everyone is paid and regression test added.

@melvin-bot melvin-bot bot removed the Overdue label Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor FirstPick Engineering only, please! Only add when there is an identified code solution.
Projects
None yet
Development

No branches or pull requests

5 participants