Skip to content

feat: auto-fill OTP verification codes from Android notifications - #303

Open
aislingheart wants to merge 1 commit into
sameerasw:developfrom
aislingheart:feat/otp-autofill
Open

aislingheart wants to merge 1 commit into
sameerasw:developfrom
aislingheart:feat/otp-autofill

Conversation

@aislingheart

Copy link
Copy Markdown

What

Detects one-time verification codes in mirrored Android notifications and copies them to the Mac clipboard for quick pasting (Mac-local only, never synced back to Android).

How

  • New OtpCodeExtractor (Core/Util/OTP/): keyword gate (code, otp, verification, 2fa, …) so years/prices/counts never trigger, then matches grouped (123 456, 123-456, 73 91 08) preferred over plain (482910), 4–8 digits, year-like 1900–2099 rejected.
  • Hook in AppState.addNotification — the single funnel both WebSocket and BLE already flow through — gated on contentChanged so repeat/ongoing updates don't re-copy.
  • New isOtpAutofillEnabled setting (defaults on, persisted), toggle + hint in Sync → Clipboard Sync. Strings in en.json only (Crowdin picks up the rest).

Verification

  • AirSync Self Compiled scheme: BUILD SUCCEEDED.
  • Extractor behavior harness (compiled + run standalone): 13/13 cases pass (plain/grouped/triple-grouped codes detected; years, prices, non-keyword numbers ignored).
  • No protocol changes; no Android changes needed. Overlap checked: no open PR/branch touches this path.

@aislingheart
aislingheart changed the base branch from main to develop October 17, 2026 13:14

This branch has not been deployed

No deployments
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.

1 participant