Skip to content

[BT-128] Migrate forwardTo Routes - 2FA Flow #83360

@mjasikowski

Description

@mjasikowski

Description

Current State:

  • 5 routes use both backTo AND forwardTo parameters
  • These routes are part of the 2FA verification flow
  • They require special handling with FORWARD_TO_MAPPINGS configuration

Implementation:

  • Configure FORWARD_TO_MAPPINGS for the 2FA navigation chain
  • Replace forwardTo parameters with dynamic route mappings
  • Follow chain: VERIFY_ACCOUNT → ROOT → VERIFY → SUCCESS
  • Test complete 2FA flow including forward navigation

Scope

Routes (5):

Route Constant Path
SETTINGS_CONTACT_METHOD_VERIFY_ACCOUNT settings/profile/contact-methods/verify
SETTINGS_2FA_VERIFY_ACCOUNT settings/security/two-factor-auth/verify-account
SETTINGS_2FA_ROOT settings/security/two-factor-auth
SETTINGS_2FA_VERIFY settings/security/two-factor-auth/verify
SETTINGS_2FA_SUCCESS settings/security/two-factor-auth/success

Usages

SETTINGS_2FA_VERIFY_ACCOUNT:

  • src/pages/settings/Security/SecuritySettingsPage.tsx:142
  • src/pages/settings/Security/TwoFactorAuth/CopyCodesPage.tsx:49
  • src/pages/RequireTwoFactorAuthenticationPage.tsx:49
  • src/components/ConnectToXeroFlow/index.tsx:46
  • src/components/ConnectToXeroFlow/index.native.tsx:56

SETTINGS_2FA_ROOT:

  • src/pages/settings/Security/SecuritySettingsPage.tsx:145
  • src/libs/Navigation/Navigation.ts:54
  • src/pages/settings/Security/TwoFactorAuth/VerifyPage.tsx:95
  • src/pages/settings/Security/TwoFactorAuth/VerifyAccountPage.tsx:14
  • src/pages/settings/Security/TwoFactorAuth/SuccessPage.tsx:29
  • src/pages/RequireTwoFactorAuthenticationPage.tsx:46,49
  • src/pages/ReimbursementAccount/USD/ConnectBankAccount/components/Enable2FACard.tsx:35
  • src/pages/ReimbursementAccount/NonUSD/Finish/index.tsx:70
  • src/components/ConnectToXeroFlow/index.tsx:42
  • src/components/ConnectToXeroFlow/index.native.tsx:52

SETTINGS_2FA_VERIFY:

  • src/libs/Navigation/Navigation.ts:55
  • src/pages/settings/Security/TwoFactorAuth/CopyCodesPage.tsx:161

SETTINGS_2FA_SUCCESS:

  • src/libs/Navigation/Navigation.ts:56
  • src/pages/settings/Security/TwoFactorAuth/VerifyPage.tsx:54

Files to modify:

  • src/ROUTES.ts - Update route definitions
  • src/libs/Navigation/types.ts - Update screen params
  • Components listed above

Migration Progress

  • SETTINGS_CONTACT_METHOD_VERIFY_ACCOUNT
  • SETTINGS_2FA_VERIFY_ACCOUNT
  • SETTINGS_2FA_ROOT
  • SETTINGS_2FA_VERIFY
  • SETTINGS_2FA_SUCCESS
Issue OwnerCurrent Issue Owner: @collectioneur

Metadata

Metadata

Labels

InternalRequires API changes or must be handled by Expensify staffWeeklyKSv2

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions