Skip to content

feat: add SMS fallback to the 2FA screen#207

Merged
claration merged 1 commit into
claration:mainfrom
rursache:feature/2fa-sms-fallback
Jun 15, 2026
Merged

feat: add SMS fallback to the 2FA screen#207
claration merged 1 commit into
claration:mainfrom
rursache:feature/2fa-sms-fallback

Conversation

@rursache

@rursache rursache commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Closes #128

When an account has a trusted device, Apple returns trustedDeviceSecondaryAuth and
Impactor only pushes the code to that device. The 2FA screen had no way to switch to
SMS, so anyone who relies on a text message had no way through, which is what #128 hit

The core already had the SMS methods (send_sms_2fa_to_devices, verify_sms_2fa) for the
SMS-only login path, they just weren't reachable once a trusted device was in play. This
wires them up:

  • the 2FA callback now receives the delivery method and the account's trusted phone
    numbers, and can request an SMS instead of submitting a code
  • trusted phone numbers are fetched up front when device 2FA starts, so the option is
    there right away
  • the login window lists each trusted number with a "Send via SMS ••XX" button and
    switches the prompt text once a code is sent by text
  • the CLI got the same fallback: type "sms" at the prompt, with a picker when there is
    more than one number
  • added the new strings to every locale

Tested on the account from #128: the trusted device push still behaves as before, and
choosing SMS now delivers the code and finishes login

ScreenShot_2026-06-12_19 14 09

@rursache rursache force-pushed the feature/2fa-sms-fallback branch from b321cd4 to f348526 Compare June 12, 2026 16:22
@claration

Copy link
Copy Markdown
Owner

Do you know all these languages to be filling out all the localizations?

@rursache

Copy link
Copy Markdown
Contributor Author

@claration no, i used AI to fill those instead of shipping only english considering this is a multilanguage project

@claration

Copy link
Copy Markdown
Owner

I suggest keeping them english so users who speak those languages can fill them out when they have the time to :) at least to me, its better this way.

When an account has a trusted device, Apple returns trustedDeviceSecondaryAuth and the
code is only pushed to the device, with no way to switch to SMS. This wires the existing
SMS 2FA core methods into the login flow:

- plume_core: the 2FA callback now receives a TwoFactorRequest (delivery method + trusted
  phone numbers) and returns a TwoFactorAction (SubmitCode or SendSms), so the caller can
  request an SMS fallback mid-flow. Trusted phone numbers are fetched up front via
  get_auth_extras when device 2FA starts.
- GUI: the 2FA screen lists each trusted phone number and adds a Send via SMS button; the
  prompt updates to reflect the active delivery channel.
- CLI: typing 'sms' at the prompt switches delivery to SMS, with a picker when there is
  more than one number.
@rursache rursache force-pushed the feature/2fa-sms-fallback branch from f348526 to 26b53fa Compare June 12, 2026 19:39
@rursache

Copy link
Copy Markdown
Contributor Author

@claration updated to remove non-english translations

@claration claration merged commit f673359 into claration:main Jun 15, 2026
@claration

Copy link
Copy Markdown
Owner

thank you!

@rursache rursache deleted the feature/2fa-sms-fallback branch June 15, 2026 07:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] 2FA Code is not being sent via SMS

2 participants