From ac9695994741a60b456afb905269f42197f15790 Mon Sep 17 00:00:00 2001 From: Joseph Garrone Date: Sun, 23 Jun 2024 00:37:06 +0200 Subject: [PATCH] Add missing fieldNames from synthetic user attributes --- .../generateResources/readFieldNameUsage.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/bin/keycloakify/generateResources/readFieldNameUsage.ts b/src/bin/keycloakify/generateResources/readFieldNameUsage.ts index 8efac289..7f5b65ee 100644 --- a/src/bin/keycloakify/generateResources/readFieldNameUsage.ts +++ b/src/bin/keycloakify/generateResources/readFieldNameUsage.ts @@ -11,7 +11,15 @@ export function readFieldNameUsage(params: { }): string[] { const { themeSrcDirPath, themeType } = params; - const fieldNames = new Set(); + // NOTE: We pre-populate with the synthetic user attributes defined in useUserProfileForm (can't be parsed automatically) + const fieldNames = new Set([ + "firstName", + "lastName", + "email", + "username", + "password", + "password-confirm" + ]); for (const srcDirPath of [ pathJoin(getThisCodebaseRootDirPath(), "src", themeType),