MarshallOfSound

#51592: fix: ship IDS_WEBAUTHN_TOUCH_ID_PROMPT_REASON and allow overriding it

Merged
Created: May 12, 2026, 9:52:33 AM
Merged: May 12, 2026, 12:08:23 PM
6 comments
Target: main

Description of Change

Fixes a crash in the macOS Touch ID prompt for WebAuthn requests caused by IDS_WEBAUTHN_TOUCH_ID_PROMPT_REASON not being shipped in Electron's locale .pak files, and lets apps override the prompt text.

  • Packs device/fido/strings into Electron's locale .pak files so IDS_WEBAUTHN_TOUCH_ID_PROMPT_REASON (default: verify your identity on $1) is present at runtime — previously the resource was never repacked, so the lookup failed when the Touch ID prompt was shown.
  • Adds an optional touchID.promptReason to app.configureWebAuthn() which calls ResourceBundle::OverrideLocaleStringResource to replace the default. An optional $1 placeholder is substituted with the relying party ID; without it the string is used verbatim.
  • Validation and side effects are ordered so an invalid promptReason doesn't leave the keychain group half-configured.

macOS renders the prompt as "<App Name>" is trying to <promptReason>.

Checklist

  • PR description included and stakeholders cc'd
  • npm test passes
  • tests are changed or added
  • relevant documentation is changed or added
  • PR title follows semantic commit guidelines

Release Notes

Notes: Fixed a crash in the macOS Touch ID WebAuthn prompt caused by a missing string resource, and added touchID.promptReason to app.configureWebAuthn() to customize the prompt text.

Backports

41-x-y
Merged
PR Number
#51604
Merged At
May 13, 2026, 2:29:06 PM
Released In
v41.6.0
Release Date
May 13, 2026, 3:54:24 PM
42-x-y
Merged
PR Number
#51594
Merged At
May 12, 2026, 1:53:56 PM
Released In
Not yet
Release Date
Not yet
43-x-y
Merged
PR Number
#51595
Merged At
May 12, 2026, 2:12:40 PM
Released In
v43.0.0-alpha.2
Release Date
May 13, 2026, 1:00:14 PM

Semver Impact

Major
Breaking changes
Minor
New features
Patch
Bug fixes
None
Docs, tests, etc.

Semantic Versioning helps users understand the impact of updates:

  • Major (X.y.z): Breaking changes that may require code modifications
  • Minor (x.Y.z): New features that maintain backward compatibility
  • Patch (x.y.Z): Bug fixes that don't change the API
  • None: Changes that don't affect using facing parts of Electron