From 731ef92b634f41784c6f76883a5fcb38efdf80e5 Mon Sep 17 00:00:00 2001 From: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com> Date: Wed, 8 May 2024 15:59:46 +0200 Subject: [PATCH 1/2] docs: add some additional error handling to the examples --- .../reference/security/two-factor-authentication.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/14/umbraco-cms/reference/security/two-factor-authentication.md b/14/umbraco-cms/reference/security/two-factor-authentication.md index ac467bad092..e971ee03408 100644 --- a/14/umbraco-cms/reference/security/two-factor-authentication.md +++ b/14/umbraco-cms/reference/security/two-factor-authentication.md @@ -679,13 +679,15 @@ export default class My2faViewElement extends UmbLitElement { async onSubmit(evt, provider) { evt.preventDefault(); + this.codeField.error = false; + this.codeField.setCustomValidity(''); + this.errorMessage = ''; + /** * @type {HTMLFormElement} */ const form = evt.target; - this.codeField.error = false; - const isValid = form.checkValidity(); if (!isValid) { return; @@ -722,7 +724,7 @@ export default class My2faViewElement extends UmbLitElement { renderProvider(provider) { return html` -
this.onSubmit(e, provider)}> + this.onSubmit(e, provider)} novalidate>

${provider}

You are about to sign-in with ${provider}.

From f0d67f12859b27edd230def1a3972b6b18551274 Mon Sep 17 00:00:00 2001 From: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com> Date: Wed, 8 May 2024 16:04:19 +0200 Subject: [PATCH 2/2] docs: remove reference to Umbraco.Extensions --- 14/umbraco-cms/reference/security/two-factor-authentication.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/14/umbraco-cms/reference/security/two-factor-authentication.md b/14/umbraco-cms/reference/security/two-factor-authentication.md index e971ee03408..a6660a4a700 100644 --- a/14/umbraco-cms/reference/security/two-factor-authentication.md +++ b/14/umbraco-cms/reference/security/two-factor-authentication.md @@ -119,7 +119,6 @@ Now we need to register the `UmbracoAppAuthenticator` implementation. This can b using Umbraco.Cms.Core.Composing; using Umbraco.Cms.Core.DependencyInjection; using Umbraco.Cms.Core.Security; -using Umbraco.Extensions; namespace My.Website; @@ -206,7 +205,6 @@ using Google.Authenticator; using Umbraco.Cms.Core.Models.Membership; using Umbraco.Cms.Core.Security; using Umbraco.Cms.Core.Services; -using Umbraco.Extensions; namespace My.Website; @@ -296,7 +294,6 @@ using Umbraco.Cms.Core.Composing; using Umbraco.Cms.Core.DependencyInjection; using Umbraco.Cms.Core.Security; using Umbraco.Cms.Web.BackOffice.Security; -using Umbraco.Extensions; namespace My.Website;