diff --git a/src/Umbraco.Web.UI.Client/apps/auth/index.html b/src/Umbraco.Web.UI.Client/apps/auth/index.html index 75922ccae2..de2b8a4cdc 100644 --- a/src/Umbraco.Web.UI.Client/apps/auth/index.html +++ b/src/Umbraco.Web.UI.Client/apps/auth/index.html @@ -10,6 +10,6 @@ - + diff --git a/src/Umbraco.Web.UI.Client/apps/auth/src/auth-new.context.ts b/src/Umbraco.Web.UI.Client/apps/auth/src/auth-new.context.ts index 6699fc84e4..8f4d726ab8 100644 --- a/src/Umbraco.Web.UI.Client/apps/auth/src/auth-new.context.ts +++ b/src/Umbraco.Web.UI.Client/apps/auth/src/auth-new.context.ts @@ -11,7 +11,7 @@ export class UmbAuthNewContext implements UmbAuthContext { async login(data: LoginRequestModel) { //TODO: call authUrl with data - const { error } = await UmbMockAPI.login(data, true); + const { error } = await UmbMockAPI.login(data, false); //TODO Should the redirect be done here? or in the login element? diff --git a/src/Umbraco.Web.UI.Client/apps/auth/src/login.element.ts b/src/Umbraco.Web.UI.Client/apps/auth/src/login.element.ts index 348b7f044c..5349e750b9 100644 --- a/src/Umbraco.Web.UI.Client/apps/auth/src/login.element.ts +++ b/src/Umbraco.Web.UI.Client/apps/auth/src/login.element.ts @@ -69,6 +69,11 @@ export default class UmbLoginElement extends LitElement { this._loginError = error || ''; this._loginState = error ? 'failed' : 'success'; + + if (error) return; + + //TODO: Should redirecting be done here or in the context? + location.replace(this.returnUrl); }; @state()