diff --git a/src/services/keycloak.ts b/src/services/keycloak.ts index b83a522..984817f 100644 --- a/src/services/keycloak.ts +++ b/src/services/keycloak.ts @@ -75,7 +75,7 @@ export async function createUser(username: string, password: string, opts?: Reco }, method: "POST", body: JSON.stringify({ - enabled: true, + enabled: opts?.enabled !== undefined ? opts.enabled : true, credentials: [{ type: "password", value: password }], username, ...opts, @@ -110,7 +110,7 @@ export async function editUser(userId: string, opts: Record) { }, method: "PUT", body: JSON.stringify({ - enabled: true, + enabled: opts?.enabled !== undefined ? opts.enabled : true, credentials: (password && [{ type: "password", value: opts?.password }]) || undefined, ...rest, }),