From 036fb7861fb8fb12f1dcabbd8edab9b322b7c96c Mon Sep 17 00:00:00 2001 From: zeripath Date: Tue, 6 Jun 2023 06:29:37 +0100 Subject: Clean up WebAuthn javascript code and remove JQuery code (#22697) There were several issues with the WebAuthn registration and testing code and the style was very old javascript with jquery callbacks. This PR uses async and fetch to replace the JQuery code. Ref #22651 Signed-off-by: Andrew Thornton --------- Signed-off-by: Andrew Thornton Co-authored-by: delvh Co-authored-by: silverwind --- templates/user/auth/webauthn.tmpl | 2 +- templates/user/auth/webauthn_error.tmpl | 31 +++++++++----------------- templates/user/settings/security/webauthn.tmpl | 2 +- 3 files changed, 13 insertions(+), 22 deletions(-) (limited to 'templates') diff --git a/templates/user/auth/webauthn.tmpl b/templates/user/auth/webauthn.tmpl index ea773d2566..f1c4f29fd9 100644 --- a/templates/user/auth/webauthn.tmpl +++ b/templates/user/auth/webauthn.tmpl @@ -5,6 +5,7 @@

{{.locale.Tr "twofa"}}

+ {{template "user/auth/webauthn_error" .}}
{{svg "octicon-key" 56}}

{{.locale.Tr "webauthn_insert_key"}}

@@ -18,5 +19,4 @@
-{{template "user/auth/webauthn_error" .}} {{template "base/footer" .}} diff --git a/templates/user/auth/webauthn_error.tmpl b/templates/user/auth/webauthn_error.tmpl index b6467de1aa..f90882ef12 100644 --- a/templates/user/auth/webauthn_error.tmpl +++ b/templates/user/auth/webauthn_error.tmpl @@ -1,22 +1,13 @@ -