Skip to content

Commit 910e729

Browse files
author
Neilson Soult
committed
fix(web): restore password-manager autofill on auth forms via autocomplete tokens
1 parent 3717500 commit 910e729

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

apps/web/core/components/account/auth-forms/email.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export const AuthEmailForm = observer(function AuthEmailForm(props: TAuthEmailFo
7474
value={email}
7575
onChange={(e) => setEmail(e.target.value)}
7676
placeholder={t("auth.common.email.placeholder")}
77-
autoComplete="off"
77+
autoComplete="username"
7878
autoFocus
7979
ref={inputRef}
8080
/>

apps/web/core/components/account/auth-forms/password.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ export const AuthPasswordForm = observer(function AuthPasswordForm(props: Props)
213213
placeholder={t("auth.common.password.placeholder")}
214214
onFocus={() => setIsPasswordInputFocused(true)}
215215
onBlur={() => setIsPasswordInputFocused(false)}
216-
autoComplete="off"
216+
autoComplete={mode === EAuthModes.SIGN_IN ? "current-password" : "new-password"}
217217
autoFocus
218218
/>
219219
<button
@@ -250,7 +250,7 @@ export const AuthPasswordForm = observer(function AuthPasswordForm(props: Props)
250250
placeholder={t("auth.common.password.confirm_password.placeholder")}
251251
onFocus={() => setIsRetryPasswordInputFocused(true)}
252252
onBlur={() => setIsRetryPasswordInputFocused(false)}
253-
autoComplete="off"
253+
autoComplete="new-password"
254254
/>
255255
<button
256256
type="button"

0 commit comments

Comments
 (0)