Skip to content

Commit 9238525

Browse files
committed
Add user-facing error message when security error occurs...
...during passkey verification through the button.
1 parent d408069 commit 9238525

File tree

3 files changed

+47
-28
lines changed

3 files changed

+47
-28
lines changed

client/src/auth.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,17 @@ import {
290290
status: gettext("Verification canceled or not allowed."),
291291
});
292292
break;
293+
case "SecurityError":
294+
await setPasskeyVerifyState({
295+
buttonDisabled: false,
296+
buttonLabel,
297+
requestFocus: true,
298+
statusEnum: StatusEnum.SECURITY_ERROR,
299+
status: gettext(
300+
"Passkey authentication failed. A technical problem prevents the verification process for beginning. Please try another method.",
301+
),
302+
});
303+
break;
293304
default:
294305
await setPasskeyVerifyState({
295306
buttonDisabled: false,

src/django_otp_webauthn/locale/nl/LC_MESSAGES/django.po

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: PACKAGE VERSION\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2025-02-27 21:44+0000\n"
11+
"POT-Creation-Date: 2025-11-22 13:46+0000\n"
1212
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1313
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1414
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -18,19 +18,19 @@ msgstr ""
1818
"Content-Transfer-Encoding: 8bit\n"
1919
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
2020

21-
#: src/django_otp_webauthn/admin.py:41
21+
#: src/django_otp_webauthn/admin.py:38
2222
msgid "COSE public key"
2323
msgstr "Publieke COSE-sleutel"
2424

25-
#: src/django_otp_webauthn/admin.py:63
25+
#: src/django_otp_webauthn/admin.py:62
2626
msgid "Identity"
2727
msgstr "Identiteit"
2828

29-
#: src/django_otp_webauthn/admin.py:69
29+
#: src/django_otp_webauthn/admin.py:68
3030
msgid "Meta"
3131
msgstr "Meta-gegevens"
3232

33-
#: src/django_otp_webauthn/admin.py:75
33+
#: src/django_otp_webauthn/admin.py:74
3434
msgid "WebAuthn credential data"
3535
msgstr "WebAuthn-gegevens"
3636

@@ -68,26 +68,26 @@ msgstr ""
6868
"De Passkey die u probeert te gebruiken is niet gevonden. Misschien is deze "
6969
"verwijderd?"
7070

71-
#: src/django_otp_webauthn/models.py:79
72-
msgid "WebAuthn attestation"
73-
msgstr "WebAuthn attestatie"
74-
75-
#: src/django_otp_webauthn/models.py:80
76-
msgid "WebAuthn attestations"
77-
msgstr "WebAuthn attestaties"
78-
79-
#: src/django_otp_webauthn/models.py:96
71+
#: src/django_otp_webauthn/models.py:86
8072
msgid "format"
8173
msgstr "formaat"
8274

83-
#: src/django_otp_webauthn/models.py:100
75+
#: src/django_otp_webauthn/models.py:90
8476
msgid "data"
8577
msgstr "data"
8678

87-
#: src/django_otp_webauthn/models.py:104
79+
#: src/django_otp_webauthn/models.py:94
8880
msgid "client data JSON"
8981
msgstr "client data JSON"
9082

83+
#: src/django_otp_webauthn/models.py:106
84+
msgid "WebAuthn attestation"
85+
msgstr "WebAuthn attestatie"
86+
87+
#: src/django_otp_webauthn/models.py:107
88+
msgid "WebAuthn attestations"
89+
msgstr "WebAuthn attestaties"
90+
9191
#: src/django_otp_webauthn/models.py:148
9292
msgid "WebAuthn credential"
9393
msgstr "WebAuthn credential"
@@ -140,22 +140,22 @@ msgstr "gehashte credential id"
140140
msgid "discoverable"
141141
msgstr "zichtbaar"
142142

143-
#: src/django_otp_webauthn/models.py:404
143+
#: src/django_otp_webauthn/models.py:407
144144
msgid "credential"
145145
msgstr "credential"
146146

147-
#: src/django_otp_webauthn/models.py:429
148-
msgid "WebAuthn user handle"
149-
msgstr "WebAuthn user handle"
150-
151-
#: src/django_otp_webauthn/models.py:430
152-
msgid "WebAuthn user handles"
153-
msgstr "WebAuthn user handles"
154-
155-
#: src/django_otp_webauthn/models.py:437
147+
#: src/django_otp_webauthn/models.py:433
156148
msgid "handle hex"
157149
msgstr "handle hex"
158150

159-
#: src/django_otp_webauthn/models.py:447
151+
#: src/django_otp_webauthn/models.py:443
160152
msgid "user"
161153
msgstr "gebruiker"
154+
155+
#: src/django_otp_webauthn/models.py:447
156+
msgid "WebAuthn user handle"
157+
msgstr "WebAuthn user handle"
158+
159+
#: src/django_otp_webauthn/models.py:448
160+
msgid "WebAuthn user handles"
161+
msgstr "WebAuthn user handles"

src/django_otp_webauthn/locale/nl/LC_MESSAGES/djangojs.po

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: PACKAGE VERSION\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2024-05-11 17:52+0200\n"
11+
"POT-Creation-Date: 2025-11-22 13:46+0000\n"
1212
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1313
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1414
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -40,6 +40,14 @@ msgstr "Verificatie afgebroken."
4040
msgid "Verification canceled or not allowed."
4141
msgstr "Verificatie geannuleerd of niet toegestaan."
4242

43+
msgid ""
44+
"Passkey authentication failed. A technical problem prevents the verification "
45+
"process for beginning. Please try another method."
46+
msgstr ""
47+
"Inloggen met Passkey mislukt. Er is een technisch probleem opgetreden "
48+
"waardoor het proces niet kan worden gestart. Probeer een andere "
49+
"authenticatiemethode."
50+
4351
msgid "Verification failed. An unknown error occurred."
4452
msgstr "Verificatie mislukt. Er is een onbekende fout opgetreden."
4553

0 commit comments

Comments
 (0)