Implement register
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
import { ftlValuesGlobalName } from "../bin/build-keycloak-theme/ftlValuesGlobalName";
|
||||
import type { generateFtlFilesCodeFactory } from "../bin/build-keycloak-theme/generateFtl";
|
||||
import { id } from "evt/tools/typeSafety/id";
|
||||
import type { KcLanguageTag } from "./i18n/KcLanguageTag";
|
||||
import type { KcLanguageTag } from "./i18n/KcLanguageTag";
|
||||
|
||||
|
||||
export type KcContext = {
|
||||
@ -14,6 +14,9 @@ export type KcContext = {
|
||||
loginRestartFlowUrl: string;
|
||||
loginResetCredentialsUrl: string;
|
||||
registrationUrl: string;
|
||||
//Specific to register
|
||||
registrationAction: string;
|
||||
loginUrl: string;
|
||||
};
|
||||
realm: {
|
||||
displayName?: string;
|
||||
@ -67,6 +70,32 @@ export type KcContext = {
|
||||
rememberMe: boolean;
|
||||
};
|
||||
registrationDisabled: boolean;
|
||||
//Specific to register
|
||||
messagesPerField: {
|
||||
printIfExists<T>(
|
||||
key:
|
||||
"userLabel" |
|
||||
"username" |
|
||||
"email" |
|
||||
"firstName" |
|
||||
"lastName" |
|
||||
"password" |
|
||||
"password-confirm",
|
||||
x: T
|
||||
): T | undefined;
|
||||
};
|
||||
register: {
|
||||
formData: {
|
||||
firstName?: string;
|
||||
displayName?: string;
|
||||
lastName?: string;
|
||||
email?: string;
|
||||
username?: string;
|
||||
}
|
||||
};
|
||||
passwordRequired: boolean;
|
||||
recaptchaRequired: boolean;
|
||||
recaptchaSiteKey: string;
|
||||
};
|
||||
|
||||
export const kcContext = id<KcContext | undefined>((window as any)[ftlValuesGlobalName]);
|
||||
|
Reference in New Issue
Block a user