fix(auth): password min length 6 + show/hide toggle on password inputs
Build & Push Docker Image / build (push) Successful in 2m21s

This commit is contained in:
opencode
2026-08-03 08:01:52 +02:00
parent 68a81ec775
commit 743b177c89
11 changed files with 49 additions and 27 deletions
@@ -15,8 +15,8 @@ import {
DropdownMenuTrigger,
} from "@/components/ui/dropdown-menu";
import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from "@/components/ui/dialog";
import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";
import { PasswordInput } from "@/components/password-input";
import { useToast } from "@/hooks/use-toast";
import { useChangeMyPassword, useGetPasswordRedirect, getGetPasswordRedirectQueryKey } from "@workspace/api-client-react";
import { useQueryClient } from "@tanstack/react-query";
@@ -182,8 +182,7 @@ export function UserMenu() {
<div className="space-y-4 py-2">
<div className="space-y-2">
<Label>{t("auth.currentPassword")}</Label>
<Input
type="password"
<PasswordInput
value={currentPassword}
onChange={(e) => setCurrentPassword(e.target.value)}
data-testid="input-current-password"
@@ -191,18 +190,16 @@ export function UserMenu() {
</div>
<div className="space-y-2">
<Label>{t("auth.newPassword")}</Label>
<Input
type="password"
<PasswordInput
value={newPassword}
onChange={(e) => setNewPassword(e.target.value)}
placeholder="min. 8 characters"
placeholder="min. 6 characters"
data-testid="input-new-password"
/>
</div>
<div className="space-y-2">
<Label>{t("auth.confirmPassword")}</Label>
<Input
type="password"
<PasswordInput
value={confirmPassword}
onChange={(e) => setConfirmPassword(e.target.value)}
data-testid="input-confirm-password"
@@ -219,7 +216,7 @@ export function UserMenu() {
toast({ title: t("auth.pwMismatch"), variant: "destructive" });
return;
}
if (newPassword.length < 8) {
if (newPassword.length < 6) {
toast({ title: t("auth.pwTooShort"), variant: "destructive" });
return;
}