Skip to content

Instantly share code, notes, and snippets.

View SSPLGautam's full-sized avatar
:electron:
Learning

Gautam Soni SSPLGautam

:electron:
Learning
View GitHub Profile
@SSPLGautam
SSPLGautam / enforceTwoFactorAuthentication.ts
Last active December 30, 2025 13:07
Force Users to Enable Two-Factor Authentication in Umbraco 14+ (14, 15, 16, 17)
import type { UmbEntryPointOnInit } from '@umbraco-cms/backoffice/extension-api';
import {
UmbCurrentUserRepository,
type UmbCurrentUserModel,
UMB_CURRENT_USER_MFA_MODAL
} from '@umbraco-cms/backoffice/current-user';
import { UMB_MODAL_MANAGER_CONTEXT } from '@umbraco-cms/backoffice/modal';
//import { UMB_NOTIFICATION_CONTEXT } from '@umbraco-cms/backoffice/notification';
import type { UmbElement } from '@umbraco-cms/backoffice/element-api';
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';