diff --git a/14/umbraco-cms/reference/security/two-factor-authentication.md b/14/umbraco-cms/reference/security/two-factor-authentication.md index 8e22fc04977..b204d4777a8 100644 --- a/14/umbraco-cms/reference/security/two-factor-authentication.md +++ b/14/umbraco-cms/reference/security/two-factor-authentication.md @@ -122,7 +122,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; @@ -211,7 +210,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; @@ -309,7 +307,7 @@ public class UmbracoAppAuthenticatorComposer : IComposer { var identityBuilder = new BackOfficeIdentityBuilder(builder.Services); - identityBuilder.AddTwoFactorProvider(UmbracoUserAppAuthenticator.Name); + identityBuilder.AddTwoFactorProvider(UmbracoUserAppAuthenticator.Name); } } ``` @@ -682,13 +680,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; @@ -725,7 +725,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}.