Skip to content

feat(auth): enforce onboarding before app access - #50

Open
maxstue wants to merge 2 commits into
mainfrom
feature/kijk-343
Open

feat(auth): enforce onboarding before app access#50
maxstue wants to merge 2 commits into
mainfrom
feature/kijk-343

Conversation

@maxstue

@maxstue maxstue commented Aug 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • replace placeholder user provisioning during sign-in with an explicit /users/me onboarding state
  • make onboarding completion idempotent and enforce a unique external auth ID
  • protect post-onboarding API endpoints with separate onboarding and household-role authorization policies
  • split authenticated client routes into onboarding and ready-app layouts using directory route.tsx files
  • share current-user data through TanStack Query and clear it explicitly after logout

Why

Authenticated identities previously depended on sign-in provisioning and the frontend duplicated readiness assumptions. This made onboarding state and access control less explicit and could leave stale current-user data during authentication transitions.

Impact

The backend is now authoritative for whether onboarding is complete. Users who have not completed onboarding can access only the current-user and onboarding endpoints; application endpoints return 403. Ready users continue through the normal app routes, while the client consumes one shared current-user query.

Validation

  • pnpm build
  • pnpm fmt
  • pnpm lint
  • client typecheck and Vite production build
  • API Release build and dotnet format --verify-no-changes
  • pre-commit lint-staged checks for API and client
  • React Doctor: 97/100, no issues
  • Fallow: no newly introduced dead code or complexity findings; warnings are inherited/generated duplication
  • secrets scan passed for changed source directories

Notes

pnpm audit was not executed because it sends dependency metadata to an external registry and that export was not separately authorized.

Refs: KIJK-343

Replace sign-in provisioning with an explicit current-user onboarding state and idempotent onboarding completion. Protect application endpoints and routes with onboarding and household-role authorization.

Refs: KIJK-343
@linear-code

linear-code Bot commented Aug 1, 2026

Copy link
Copy Markdown

KIJK-343

@maxstue
maxstue marked this pull request as ready for review August 1, 2026 09:29
@maxstue maxstue self-assigned this Aug 1, 2026
Remove final newlines from the changed API files to match the API EditorConfig and satisfy the CI format check.

Refs: KIJK-343
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant