Skip to content

Commit 1ed3d54

Browse files
fix: enable password manager autofill for all password fields (#8295)
- Added autofillHints to password fields in sign-in, password setup, and password change screens - Enables password managers (1Password, LastPass, Bitwarden, etc.) to detect and autofill password fields - Minimal change: only added AutofillHints.password property to 8 password fields across 4 files
1 parent 2e00509 commit 1ed3d54

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

frontend/appflowy_flutter/lib/user/presentation/screens/sign_in_screen/widgets/continue_with/continue_with_password_page.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ class _ContinueWithPasswordPageState extends State<ContinueWithPasswordPage> {
133133
hintText: LocaleKeys.signIn_enterPassword.tr(),
134134
autoFocus: true,
135135
obscureText: true,
136+
autofillHints: const [AutofillHints.password],
136137
suffixIconConstraints: BoxConstraints.tightFor(
137138
width: iconSize + theme.spacing.m,
138139
height: iconSize,

frontend/appflowy_flutter/lib/user/presentation/screens/sign_in_screen/widgets/continue_with/set_new_password.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ class _SetNewPasswordWidgetState extends State<SetNewPasswordWidget> {
145145
key: newPasswordKey,
146146
controller: newPasswordController,
147147
obscureText: true,
148+
autofillHints: const [AutofillHints.password],
148149
hintText: LocaleKeys.signIn_enterNewPassword.tr(),
149150
onSubmitted: (_) => _validateAndSubmit(),
150151
),
@@ -160,6 +161,7 @@ class _SetNewPasswordWidgetState extends State<SetNewPasswordWidget> {
160161
key: confirmPasswordKey,
161162
controller: confirmPasswordController,
162163
obscureText: true,
164+
autofillHints: const [AutofillHints.password],
163165
hintText: LocaleKeys.signIn_confirmNewPassword.tr(),
164166
onSubmitted: (_) => _validateAndSubmit(),
165167
),

frontend/appflowy_flutter/lib/workspace/presentation/settings/pages/account/password/change_password.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ class _ChangePasswordDialogContentState
141141
.tr(),
142142
keyboardType: TextInputType.visiblePassword,
143143
obscureText: true,
144+
autofillHints: const [AutofillHints.password],
144145
suffixIconConstraints: BoxConstraints.tightFor(
145146
width: iconSize + theme.spacing.m,
146147
height: iconSize,
@@ -173,6 +174,7 @@ class _ChangePasswordDialogContentState
173174
.tr(),
174175
keyboardType: TextInputType.visiblePassword,
175176
obscureText: true,
177+
autofillHints: const [AutofillHints.password],
176178
suffixIconConstraints: BoxConstraints.tightFor(
177179
width: iconSize + theme.spacing.m,
178180
height: iconSize,
@@ -205,6 +207,7 @@ class _ChangePasswordDialogContentState
205207
.tr(),
206208
keyboardType: TextInputType.visiblePassword,
207209
obscureText: true,
210+
autofillHints: const [AutofillHints.password],
208211
suffixIconConstraints: BoxConstraints.tightFor(
209212
width: iconSize + theme.spacing.m,
210213
height: iconSize,

frontend/appflowy_flutter/lib/workspace/presentation/settings/pages/account/password/setup_password.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ class _SetupPasswordDialogContentState
136136
.tr(),
137137
keyboardType: TextInputType.visiblePassword,
138138
obscureText: true,
139+
autofillHints: const [AutofillHints.password],
139140
suffixIconConstraints: BoxConstraints.tightFor(
140141
width: iconSize + theme.spacing.m,
141142
height: iconSize,
@@ -168,6 +169,7 @@ class _SetupPasswordDialogContentState
168169
.tr(),
169170
keyboardType: TextInputType.visiblePassword,
170171
obscureText: true,
172+
autofillHints: const [AutofillHints.password],
171173
suffixIconConstraints: BoxConstraints.tightFor(
172174
width: iconSize + theme.spacing.m,
173175
height: iconSize,

0 commit comments

Comments
 (0)