Skip to content

[Due for payment 2025-03-27] [$250] 2FA - Hybrid - User asked to again validate account after disabling 2FA #58682

Closed

Description

@jponikarchuk

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: 9.1.15-0
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: No, reproducible on hybrid only
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/5766528
Email or phone of affected tester (no customers): applausetester+ck3182510@applause.expensifail.com
Issue reported by: Applause Internal Team
Device used: Pixel 8a/Android 15
App Component: User Settings

Action Performed:

  1. Launch Hybrid app
  2. Log in with new validated account
  3. Go to Settings >> Security >> 2FA
  4. Enter the magic code to validate account to use 2FA feature
  5. Go through the 2FA process
  6. Once the 2FA is enabled, log out of the account
  7. Log in with same account >> enter magic account >> enter 2FA code
  8. Go to Settings >> Security >> 2FA
  9. Disable 2FA
  10. Enter 2FA code from authenticator app
  11. Observe user asked to again validate account

Expected Result:

User should not be prompted to validate account again after disabling 2FA.

Actual Result:

User asked to again validate account to enter magic code after disabling 2FA

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

1.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021902273993490623286
  • Upwork Job ID: 1902273993490623286
  • Last Price Increase: 2025-03-19
  • Automatic offers:
    • allgandalf | Reviewer | 106585286
Issue OwnerCurrent Issue Owner: @sakluger

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    DeployBlockerCashThis issue or pull request should block deployment
    on Mar 19, 2025
  2. melvin-bot commented on Mar 19, 2025

    @melvin-bot

    Triggered auto assignment to @MariaHCD (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

  3. melvin-bot commented on Mar 19, 2025

    @melvin-bot

    💬 A slack conversation has been started in #expensify-open-source

  4. melvin-bot commented on Mar 19, 2025

    @melvin-bot

    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.

  5. github-actions commented on Mar 19, 2025

    @github-actions
    Contributor

    👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  6. dukenv0307 commented on Mar 19, 2025

    @dukenv0307
    Contributor

    Proposal

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

    User asked to again validate account to enter magic code after disabling 2FA

    What is the root cause of that problem?

    When we redirect to ND after signing in, account?.validated is undefined then the validate modal appears again after we disabled the 2FA

    const isUserValidated = account?.validated;

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

    To check the isUserValidated we should use user?.validated

    const [isUserValidated] = useOnyx(ONYXKEYS.USER, {selector: (user) => !!user?.validated});
    

    const isUserValidated = account?.validated;

    What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    None

    What alternative solutions did you explore? (Optional)

    Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

  7. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Mar 19, 2025
  8. melvin-bot commented on Mar 19, 2025

    @melvin-bot
  9. 34 remaining items

  10. MariaHCD commented on Mar 21, 2025

    @MariaHCD
    Contributor

    it might actually be a BE bug

    Oh, interesting but I'm not sure about that - do you mean that an API command that is supposed to return the Account data isn't returning that data correctly?

    We definitely to standardize the usage

    Yes, agreed. From our internal convo, I think we will be merging User and Account into a single model: Account. I double check on Monday if any of our internal engineers have any objections. If not, I will create an issue to merge those two models.

  11. bernhardoj commented on Mar 21, 2025

    @bernhardoj
    Contributor

    do you mean that an API command that is supposed to return the Account data isn't returning that data correctly?

    Yeah, that's my guess. My PR is already deployed to prod, but this issue is marked as a deploy blocker, so there might be something changed with the API.

  12. MariaHCD commented on Mar 27, 2025

    @MariaHCD
    Contributor

    I'm proposing that we deprecate the User model and merge it into the Account model internally: https://expensify.slack.com/archives/C03TQ48KC/p1743072786763749?thread_ts=1742392904.804209&cid=C03TQ48KC

    If there are no objections, I will create a separate issue to tackle that so we can centralize all user/account related information in the Account model.

  13. sakluger commented on Mar 27, 2025

    @sakluger
    Contributor

    Summarizing payment on this issue:

    Contributor: @dukenv0307 $250, please request on Newdot
    Contributor+: @allgandalf $250, paid via Upwork

  14. sakluger commented on Mar 27, 2025

    @sakluger
    Contributor

    Oops, I forgot that there was an outstanding question from @MariaHCD proposing that we deprecate the User model and merge it into the Account model internally in a separate issue.

    @MariaHCD - I've finished handling payment, so if everyone agrees with your proposal, feel free to close out this issue when you're ready.

  15. MariaHCD commented on Mar 28, 2025

    @MariaHCD
    Contributor

    Internal convo on deprecating the User model got no pushback so far: https://expensify.slack.com/archives/C03TQ48KC/p1743072786763749?thread_ts=1742392904.804209&cid=C03TQ48KC

    So I will create a new issue for that :) We can close this one out. Thanks, all!

  16. JmillsExpensify commented on Apr 25, 2025

    @JmillsExpensify
    Contributor

    $250 approved for @dukenv0307

  17. added
    ReviewingHas a PR in review
    and removed on May 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.EngineeringExternalAdded to denote the issue can be worked on by a contributorReviewingHas a PR in reviewWeeklyKSv2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions