Browse Source

fix: use correct password autocomplete for signup

Password manager act based on the 'autocomplet' attribute
of the password fields. If the attribut is set to
"current-password" they try to fill the password with an
existing one. If it is set to "new-password" they try to
support the user by generating a new password.
For signup in owui, the password was always set to
"current-password", so the password manager never proposed
a password on signup.
guenhter 4 days ago
parent
commit
f0e60c28df
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/routes/auth/+page.svelte

+ 2 - 2
src/routes/auth/+page.svelte

@@ -302,8 +302,8 @@
 											id="password"
 											class="my-0.5 w-full text-sm outline-hidden bg-transparent"
 											placeholder={$i18n.t('Enter Your Password')}
-											autocomplete="current-password"
-											name="current-password"
+											autocomplete={mode === 'signup' ? 'new-password' : 'current-password'}
+											name="password"
 											required
 										/>
 									</div>