Files
ds-chat/backend/app/schemas/password.py
T
ksmith fc96e85014 Add self-service password change, forgot-password flow, and fix admin UI bugs
Users can change their own password from the profile modal, and a
"forgot password" link sends a 15-minute expiring reset link (same
hashed-token pattern as site invites). The forgot-password response is
always generic so it never reveals which emails are registered.

Also fixes two admin-page display bugs found while testing: table row
divider lines that didn't line up across a row (the actions column had
`display: flex` on the <td> itself, breaking it out of normal table-cell
layout -- moved to a child <div>), and the pending-invites list floating
with no visual grouping (now boxed with a label and per-status badges).
2026-08-14 21:06:17 -06:00

16 lines
348 B
Python

from pydantic import BaseModel, EmailStr, Field
class PasswordChange(BaseModel):
current_password: str
new_password: str = Field(min_length=8, max_length=200)
class ForgotPasswordRequest(BaseModel):
email: EmailStr
class ResetPasswordComplete(BaseModel):
token: str
new_password: str = Field(min_length=8, max_length=200)