Kevin Jump
06/22/2026, 10:16 AMts
/**
* Pre-configure the generated client by copying the Umbraco HTTP client's config.
*
* Called automatically by the generated client during initialization (via runtimeConfigPath).
* Inherits baseUrl, credentials, auth, and headers from umbHttpClient — which is already
* configured by the backoffice before extensions load.
*
* @see https://heyapi.dev/openapi-ts/clients/fetch#configuration
*/
export const createClientConfig: CreateClientConfig = (config) => ({
...config,
...umbHttpClient.getConfig(),
});
in the v18-rc3 extension template this is back to auth in the UmbEntryPointOnInit
ts
// load up the manifests here
export const onInit: UmbEntryPointOnInit = async (host, _extensionRegistry) => {
// Wire the generated API client into the backoffice auth context.
// configureClient() sets baseUrl + credentials, attaches the auth callback
// (cookie-based, with automatic token refresh) and binds the default
// response interceptors (401 retry, error notifications, etc.).
// The framework awaits onInit, so resolving the context here ensures the
// client is fully configured before any element in this extension can use it.
const authContext = await host.getContext(UMB_AUTH_CONTEXT);
if (!authContext) {
console.warn("UMB_AUTH_CONTEXT not available — extension API client will not be authenticated");
return;
}
authContext.configureClient(client);
console.log("Hello from my extension 🎉");
};
is this a revert in the recommended way to do it. or are the templates out of date ?Jacob Overgaard
06/22/2026, 10:19 AMWarren Buckley
06/22/2026, 12:22 PMJacob Overgaard
06/22/2026, 3:26 PM