[Bug] Two-Factor Authentication (2FA) Setup Verification Zod Message is incorrect #1831
Open
1 task done
Labels
bug
Something isn't working
needs triage
Issues that need to be triaged
v4
Issues related to the latest version
Is there an existing issue for this?
Product Variant
Cloud (http://rxresu.me)
Current Behavior
Upon setting up a TOTP device, you must "Enter the 6-digit code from your authenticator app to verify that 2FA has been setup correctly." However, if you submit an incorrect code, the message displayed in the
FormMessage
component is a strange 6-character string.As an example, I created a dummy account and put in just the first 5 digits of the 2FA code (I've since deleted the account so this screenshot isn't at risk of revealing anything sensitive.)
Expected Behavior
The error message should read "Code must be exactly 6 digits long.", as defined in the Zod schema.
Steps To Reproduce
What browsers are you seeing the problem on?
Firefox
What template are you using?
None
Anything else?
I've had a glance over the associated Zod schema. The only thing I see that might be causing this bug is the usage of the Lingui translate macro
t
. It's worth noting that thet-call-in-function
ESLint rule is being ignored for this line of the Zod schema, which may be producing strange behaviour.The text was updated successfully, but these errors were encountered: