feat: add email change functionality and comprehensive E2E auth tests#122
feat: add email change functionality and comprehensive E2E auth tests#122jakebromberg wants to merge 5 commits intomainfrom
Conversation
0fff358 to
e11bf9d
Compare
JacksonMeade
left a comment
There was a problem hiding this comment.
The way station manager permissions are managed here should be changed back to relying on the backend to bounce bad user requests.
| import type { BetterAuthSessionResponse } from "@/lib/features/authentication/utilities"; | ||
|
|
||
| /** | ||
| * POST /api/admin/organization/add-member |
There was a problem hiding this comment.
We use a pass-through method to better-auth. This is still creating business logic around user auth in the frontend; the goal of the better-auth passthrough is that the backend is the authority on whether a request has the proper permissions. This should be backed out in favor of error handling from the backend, which should already be automatically handled.
There was a problem hiding this comment.
Good call. Removed both app/api/admin/capabilities/route.ts and app/api/admin/organization/add-member/route.ts — the frontend was duplicating authorization checks that belong in the backend.
AccountEntry.tsx now calls authClient.admin.updateUser() directly for capability updates, and RosterTable.tsx was already calling authClient.organization.addMember() directly, so the add-member route was unused.
See commit f8e77db.
- Add self-service email change flow for users (with verification) - Add admin email override for locked-out users (bypasses verification) - Add capability management UI to roster - Add comprehensive E2E authentication test suite - Update components for Better Auth compatibility - Add onboarding flow for incomplete users - Add theme preference persistence - Update login and password reset UI for Better Auth - Add admin Better Auth integration - Update Redux store and hooks for Better Auth - Remove legacy authentication APIs - Add Better Auth client and core infrastructure
…ctly Remove app/api/admin/capabilities/route.ts and app/api/admin/organization/add-member/route.ts which duplicated authorization logic that belongs in the backend. AccountEntry.tsx now calls authClient.admin.updateUser() directly for capability updates, letting the backend be the authority on permissions.
e11bf9d to
c8a1d1c
Compare
Mini component now receives audioRef, isPlaying, onTogglePlay, audioContext, analyserNode, and animationFrameRef as props instead of managing audio state internally via forwardRef. Update tests to provide these required props and verify the callback-driven interface.
Summary
Email Change Feature
Self-service flow:
Admin override flow:
Test Coverage
Test plan
npm run test:run- all 460 unit tests pass