fix: add autocomplete and id attributes for password manager compatibility (#4602)

Co-authored-by: ajnart <49837342+ajnart@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
This commit is contained in:
Copilot
2025-12-09 15:59:33 +01:00
committed by GitHub
parent c3ed7090c2
commit 681aee05f0
2 changed files with 5 additions and 3 deletions

View File

@@ -64,16 +64,18 @@ export const RegistrationForm = ({ invite }: RegistrationFormProps) => {
<Stack gap="xl">
<form onSubmit={form.onSubmit(handleSubmit)}>
<Stack gap="lg">
<TextInput label={t("field.username.label")} autoComplete="off" {...form.getInputProps("username")} />
<TextInput label={t("field.username.label")} id="username" autoComplete="username" {...form.getInputProps("username")} />
<CustomPasswordInput
withPasswordRequirements
label={t("field.password.label")}
id="password"
autoComplete="new-password"
{...form.getInputProps("password")}
/>
<PasswordInput
label={t("field.passwordConfirm.label")}
id="password-confirm"
autoComplete="new-password"
{...form.getInputProps("confirmPassword")}
/>

View File

@@ -116,8 +116,8 @@ export const LoginForm = ({ providers, oidcClientName, isOidcAutoLoginEnabled, c
<>
<form onSubmit={form.onSubmit((credentials) => void signInAsync(credentials.provider, credentials))}>
<Stack gap="lg">
<TextInput label={t("field.username.label")} {...form.getInputProps("name")} />
<PasswordInput label={t("field.password.label")} {...form.getInputProps("password")} />
<TextInput label={t("field.username.label")} id="username" autoComplete="username" {...form.getInputProps("name")} />
<PasswordInput label={t("field.password.label")} id="password" autoComplete="current-password" {...form.getInputProps("password")} />
{providers.includes("credentials") && (
<Stack gap="sm">