Hide the "Sign in with Umbraco" button on Backoffice Login

I need to hide the "Sign in with Umbraco” button from this page:

I’ve been trying to vibe-code this using appEntryPoints but it just doesn’t seem to work. anyone got a solution?

I would also like a “break glass” so I dont lock myself out of the backoffice

This can be done by configuring the BackOfficeExternalLoginProviderOptions. DenyLocalLogin = true.

1 Like

I ended up solving it this way

const AUTH_PROVIDER_ALIAS = "Umb.AuthProviders.Umbraco";

const PARAM = "locallogin";

const STORAGE_KEY = "ToggleUmbracoId:UmbAuthProviderManifest";




function hasOverrideParam() {

const searchParams = new URLSearchParams(window.location.search);

if (searchParams.get(PARAM) === "1") return true;




return false;

}




export const onInit = (_, extensionRegistry) => {

const shouldShow = hasOverrideParam();




const tryCaptureManifest = () => {

const manifest = extensionRegistry.getByAlias(AUTH_PROVIDER_ALIAS);

if (manifest) {

try {

        sessionStorage.setItem(STORAGE_KEY, JSON.stringify(manifest));

} catch {

        console.error('[ToggleUmbracoId] Error occured while capturing manifest');

}

}

return manifest;

};




const tryRestoreManifest = () => {

try {

const raw = sessionStorage.getItem(STORAGE_KEY);

return raw ? JSON.parse(raw) : null;

} catch {

return null;

}

};




const apply = () => {

const isRegistered = extensionRegistry.isRegistered(AUTH_PROVIDER_ALIAS);




if (shouldShow) {

if (!isRegistered) {

const cached = tryRestoreManifest();

if (cached) {

          extensionRegistry.register(cached);

          console.log(`[ToggleUmbracoId] Re-registered ${AUTH_PROVIDER_ALIAS}`);

return true;

}

}

      console.log(`[ToggleUmbracoId] Leaving ${AUTH_PROVIDER_ALIAS} enabled`);

return true;

}




if (isRegistered) {

      tryCaptureManifest();

      extensionRegistry.unregister(AUTH_PROVIDER_ALIAS);

      console.log(`[ToggleUmbracoId] Unregistered ${AUTH_PROVIDER_ALIAS}`);

return true;

}




return false;

};




if (apply()) return;

}

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.