feat(auth): stamp profile_completed_at on Bunyip OIDC INSERT when both name claims arrive (MAPPS-329) #368

Merged
YousifShkara merged 1 commit from feat/MAPPS-329-auto-populate-profile-from-bunyip into main 2026-06-26 08:57:39 +02:00
Owner

Bunyip's BUNYIP-206 onboarding gate guarantees every fresh signup has first + last name populated BEFORE the user can reach any downstream app. upsert_user_from_oidc already used the given_name / family_name hints to seed the row, but it never set profile_completed_at, so the SPA's AuthGuard would still bounce the user to /onboarding/profile to re-type the same data Bunyip just collected. Stamp profile_completed_at = NOW() on the INSERT when both name claims came in non-empty so the SPA sees profile_completed = true from /auth/me and the user lands directly on the dashboard. Hints missing -> the row still seeds with the email-derived placeholder AND profile_completed_at stays NULL, so the existing fallback onboarding page kicks in for legacy / no-claim users. The ON CONFLICT UPDATE branch wraps the new value in COALESCE so a pre-existing timestamp survives the next login.

Adds two integration tests covering both branches (with-claims -> stamped, without-claims -> NULL).

#MAPPS-329

Bunyip's BUNYIP-206 onboarding gate guarantees every fresh signup has first + last name populated BEFORE the user can reach any downstream app. upsert_user_from_oidc already used the given_name / family_name hints to seed the row, but it never set profile_completed_at, so the SPA's AuthGuard would still bounce the user to /onboarding/profile to re-type the same data Bunyip just collected. Stamp profile_completed_at = NOW() on the INSERT when both name claims came in non-empty so the SPA sees profile_completed = true from /auth/me and the user lands directly on the dashboard. Hints missing -> the row still seeds with the email-derived placeholder AND profile_completed_at stays NULL, so the existing fallback onboarding page kicks in for legacy / no-claim users. The ON CONFLICT UPDATE branch wraps the new value in COALESCE so a pre-existing timestamp survives the next login. Adds two integration tests covering both branches (with-claims -> stamped, without-claims -> NULL). #MAPPS-329
feat(auth): stamp profile_completed_at on Bunyip OIDC INSERT when both name claims arrive (MAPPS-329)
All checks were successful
E2E / Playwright against staging (pull_request) Successful in 25s
Check / fmt + clippy + build + tests (pull_request) Successful in 1m30s
Integration / integration tests (pull_request) Successful in 7m35s
Create release / Create release from merged PR (pull_request) Successful in 11s
1a2e641587
Bunyip's BUNYIP-206 onboarding gate guarantees every fresh signup has first + last name populated BEFORE the user can reach any downstream app. upsert_user_from_oidc already used the given_name / family_name hints to seed the row, but it never set profile_completed_at, so the SPA's AuthGuard would still bounce the user to /onboarding/profile to re-type the same data Bunyip just collected. Stamp profile_completed_at = NOW() on the INSERT when both name claims came in non-empty so the SPA sees profile_completed = true from /auth/me and the user lands directly on the dashboard. Hints missing -> the row still seeds with the email-derived placeholder AND profile_completed_at stays NULL, so the existing fallback onboarding page kicks in for legacy / no-claim users. The ON CONFLICT UPDATE branch wraps the new value in COALESCE so a pre-existing timestamp survives the next login.

Adds two integration tests covering both branches (with-claims -> stamped, without-claims -> NULL).

#MAPPS-329
YousifShkara deleted branch feat/MAPPS-329-auto-populate-profile-from-bunyip 2026-06-26 08:57:39 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/mokosh-server!368
No description provided.