Users reported an issue where 2FA-enabled accounts (using security keys) could not add or confirm alternate email addresses, triggering an InvalidParameters error. The issue was reproducible on both self-hosted instances (e.g., forum.torproject.org) and meta.discourse.org. Initial investigation by pmusaraj revealed JavaScript errors related to missing modules (discourse/loader-shims, discourse/lib/ajax) before the security key authentication step, suggesting a regression unrelated to recent passkey changes. david fixed the issue via commit 283fe482, which pmusaraj confirmed resolved the problem on meta. lavamind verified the fix after upgrading their instance, successfully confirming the alternate email. The fix was acknowledged and appreciated by the community pmusaraj.
Using a 2FA-enabled account (security key), I’m unable to add an additional email address to my profile.
When clicking the “Authenticate with Security Key” button on the confirmation page, an error message is shown: You supplied invalid parameters to the request: Discourse::InvalidParameters.
This issue has been reported in relation to our self-hosted instance at forum.torproject.org, but I was also able to reproduce right here on meta.
I can reproduce on meta and locally as well. From a quick look, it doesn’t look related to passkeys but rather a similar regression to the one @davidfixed the last time.
Before pressing the “Authenticate with Security Key” button, I see JS errors:
Uncaught Error: Could not find module `discourse/loader-shims` imported from `(require)`
at missingModule (loader.js:247:1)
at findModule (loader.js:258:1)
at requireModule (loader.js:24:1)
at eval (i18n:1:1)
at en.js:1:1
and
loader.js:247 Uncaught Error: Could not find module `discourse/lib/ajax` imported from `discourse/lib/webauthn`
at missingModule (loader.js:247:1)
at findModule (loader.js:258:1)
at Module.findDeps (loader.js:168:1)
at findModule (loader.js:262:1)
at Module.findDeps (loader.js:168:1)
at findModule (loader.js:262:1)
at requireModule (loader.js:24:1)
at eval (bootstrap:3:3)
at eval (bootstrap:4:3)
at bootstrap.js:1:1