feat(auth): add password visibility toggle and remove the unused Organization field
Part 1 — show/hide password: an eye/eye-off button inside the login password input switches its type between password and text. It sits on the right (the input is LTR) with pr-10 clearance so dots never overlap the icon; type=button so a click cannot submit the form, aria-label Show/Hide password, aria-pressed + aria-controls, plus a Persian tooltip.
Part 2 — Organization field removed end-to-end after the audit proved it was a no-op: LoginPage input/state/payload spread (main + dev-mode admin login), api.ts payload type, backend LoginRequest.organization (declared but never forwarded to Casdoor — a bogus org value still logged in successfully), and the casdoor-auth.md flow diagram. The organization actually used remains CASDOOR_ORGANIZATION=inventory for /users/sync.
Verified: api + frontend images rebuilt and redeployed; login works with {username, password}; the served LoginPage chunk contains the toggle and zero org-field leftovers.
This commit is contained in:
@@ -31,7 +31,6 @@ router = APIRouter(prefix="/auth", tags=["auth"])
|
||||
class LoginRequest(BaseModel):
|
||||
username: str
|
||||
password: str
|
||||
organization: str | None = None # optional override; defaults to CASDOOR_ORGANIZATION
|
||||
|
||||
|
||||
@router.post("/login")
|
||||
|
||||
Reference in New Issue
Block a user