Skip to content

[$250] Require a magic code when provisioning a new company card #89121

@tgolen

Description

@tgolen

Coming from a discussion in this PR.

Problem

A bad actor can work to gain control of an account from an unsuspecting user by adding the attacker's contact method as a secondary contact method during the company card provisioning flow (it's in the WorkspaceCompanyCardAddWorkEmailPage component), then setting that to the primary contact method (to receive future magic codes).

Solution

  • Prompt the user for a magic code (we have this same flow in many different places in the app, so you can use those for inspiration)
  • Send that code to the API for setting the new default contact method
  • It's fine to assume for now that these requests will always be successful, even if an invalid code is entered. Eventually, the backend will start verifying the codes and return an error message if it isn't successful

cc @rafecolton @shubham1286agra

Issue OwnerCurrent Issue Owner: @shubham1206agra
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~022049169261097777754
  • Upwork Job ID: 2049169261097777754
  • Last Price Increase: 2026-05-05

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorWeeklyKSv2

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