Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/Umbraco.Web.UI.Client/src/apps/app/app.element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,11 @@ export class UmbAppElement extends UmbLitElement {
// Register Core extensions (this is specifically done here because we need these extensions to be registered before the application is initialized)
onInit(this, umbExtensionsRegistry);

// Register public extensions (login extensions)
await new UmbServerExtensionRegistrator(this, umbExtensionsRegistry).registerPublicExtensions();
// Register public extensions (login extensions) in parallel with the auth flow below.
const registerPublicExtensions = new UmbServerExtensionRegistrator(
this,
umbExtensionsRegistry,
).registerPublicExtensions();
new UmbAppEntryPointExtensionInitializer(this, umbExtensionsRegistry);

// Try to initialise the auth flow and get the runtime status
Expand All @@ -276,6 +279,9 @@ export class UmbAppElement extends UmbLitElement {
await this.#setAuthStatus();
}

// The login screen needs the public extensions before routing.
await registerPublicExtensions;

// Initialise the router
this.#redirect();
} catch (error) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,15 @@ export class UmbServerConnection extends UmbControllerBase {
* @memberof UmbServerConnection
*/
async connect() {
await this.#setStatus();
await this.#setServerConfiguration();
// Independent reads, but both are required for the backoffice to function.
const results = await Promise.allSettled([this.#setStatus(), this.#setServerConfiguration()]);
const errors = results
.filter((result): result is PromiseRejectedResult => result.status === 'rejected')
.map((result) => result.reason);
if (errors.length) {
throw errors.length === 1 ? errors[0] : new AggregateError(errors, 'Failed to connect to the Umbraco server');
}
this.#isConnected.setValue(true);
return this;
}

Expand Down Expand Up @@ -86,7 +93,6 @@ export class UmbServerConnection extends UmbControllerBase {
throw error;
}

this.#isConnected.setValue(true);
this.#status = data?.serverStatus ?? RuntimeLevelModel.UNKNOWN;
}

Expand Down
Loading