TODO: Fix account creation script — include firstName/lastName
TODO: Fix account creation script — include firstName/lastName
What
The
create_keycloak_accounts.py script in basketball-api does not set firstName and lastName when creating Keycloak users. This causes Keycloak to enforce a VERIFY_PROFILE required action on first login, forcing every parent to fill in their name before they can use the app.Fix
Update the
create_keycloak_user() function payload to include:
The player name data is already available — it's passed to
generate_password() but not to the user creation payload.Workaround Applied (2026-03-14)
Backfilled all 50 accounts (48 parents + Marcus + ldraney) via Keycloak Admin API — set firstName/lastName and cleared requiredActions. All accounts now log in cleanly.
Resolution
Being fixed as part of basketball-api #93 — the broader auto Keycloak account creation work for Phase 11 (Girls Tryout March 21). The fix includes extracting a shared Keycloak service module that both the batch script and the registration route will use.
Priority
Absorbed into Phase 11 critical path — being resolved by Issue #93.