From ced4abd1c2905a81034268b32fd8c54388ec6e0b Mon Sep 17 00:00:00 2001 From: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com> Date: Fri, 5 Apr 2024 09:51:59 +0200 Subject: [PATCH] let the app element initiate the public server extensions and wait to new up the auth controller until auth is required (i.e. not in install mode) --- src/Umbraco.Web.UI.Client/src/apps/app/app.element.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/apps/app/app.element.ts b/src/Umbraco.Web.UI.Client/src/apps/app/app.element.ts index 3e3dea0b60..80be3c84e1 100644 --- a/src/Umbraco.Web.UI.Client/src/apps/app/app.element.ts +++ b/src/Umbraco.Web.UI.Client/src/apps/app/app.element.ts @@ -16,6 +16,7 @@ import { UmbContextDebugController } from '@umbraco-cms/backoffice/debug'; import { UmbBundleExtensionInitializer, UmbEntryPointExtensionInitializer, + UmbServerExtensionRegistrator, } from '@umbraco-cms/backoffice/extension-api'; import { umbExtensionsRegistry } from '@umbraco-cms/backoffice/extension-registry'; @@ -101,12 +102,13 @@ export class UmbAppElement extends UmbLitElement { } async #setup() { - this.#authController = new UmbAppAuthController(this); this.#serverConnection = await new UmbServerConnection(this.serverUrl).connect(); this.#authContext = new UmbAuthContext(this, this.serverUrl, this.backofficePath, this.bypassAuth); new UmbAppContext(this, { backofficePath: this.backofficePath, serverUrl: this.serverUrl }); + await new UmbServerExtensionRegistrator(this, umbExtensionsRegistry).registerPublicExtensions(); + // Try to initialise the auth flow and get the runtime status try { // If the runtime level is "install" we should clear any cached tokens @@ -114,6 +116,7 @@ export class UmbAppElement extends UmbLitElement { if (this.#serverConnection.getStatus() === RuntimeLevelModel.INSTALL) { await this.#authContext.clearTokenStorage(); } else { + this.#authController = new UmbAppAuthController(this); await this.#setAuthStatus(); }