feat(profile): /settings/profile page + change-password endpoint
The user-menu's Profile link previously 404'd, and CRM users had no way
to change their password from inside the app.
- /api/v1/me/password POST wraps better-auth changePassword, surfaces a
friendlier "Current password is incorrect" on the typical failure
mode, and writes an audit_log row with metadata.revokedOtherSessions.
- /{port}/settings/profile renders display name + email + change-password
card with current/new/confirm fields and a 'Sign out other devices'
toggle.
End-to-end verified: wrong current pw → 400 with mapped message;
correct → 200 + audit row; revert → 200.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
5
src/app/(dashboard)/[portSlug]/settings/profile/page.tsx
Normal file
5
src/app/(dashboard)/[portSlug]/settings/profile/page.tsx
Normal file
@@ -0,0 +1,5 @@
|
||||
import { UserProfile } from '@/components/settings/user-profile';
|
||||
|
||||
export default function ProfilePage() {
|
||||
return <UserProfile />;
|
||||
}
|
||||
Reference in New Issue
Block a user