keycloak-scim/js/apps/account-ui/src/environment.ts
Jon Koops 77fb3c4dd4
Use correct host URL for Admin Console requests (#30535)
Closes #30432

Signed-off-by: Jon Koops <jonkoops@gmail.com>
2024-06-19 15:21:53 +02:00

31 lines
888 B
TypeScript

import {
getInjectedEnvironment,
type BaseEnvironment,
} from "@keycloak/keycloak-ui-shared";
export type Environment = BaseEnvironment & {
/** The URL to the root of the account console. */
baseUrl: string;
/** The locale of the user */
locale: string;
/** Name of the referrer application in the back link */
referrerName?: string;
/** UR to the referrer application in the back link */
referrerUrl?: string;
/** Feature flags */
features: Feature;
};
export type Feature = {
isRegistrationEmailAsUsername: boolean;
isEditUserNameAllowed: boolean;
isLinkedAccountsEnabled: boolean;
isMyResourcesEnabled: boolean;
deleteAccountAllowed: boolean;
updateEmailFeatureEnabled: boolean;
updateEmailActionEnabled: boolean;
isViewGroupsEnabled: boolean;
isOid4VciEnabled: boolean;
};
export const environment = getInjectedEnvironment<Environment>();