Enable credential autofill for signup and login (#56)
This commit is contained in:
1 parent
bd675357bb
commit
86b6aafe7d
6 files changed
+461
-117
No files matched your search
@@ -149,3 +149,66 @@ text uses a normal text node to remain exposed to assistive technology.
|
||||
Delivered in [PR #13](https://git.sendico.io/tech/sxchnge/pulls/13), branch
|
||||
`onboarding-12`. The final browser accessibility tree exposes the recipient text,
|
||||
demo status, status heading and recovery actions. PR is open for review.
|
||||
|
||||
## Browser credential autofill
|
||||
|
||||
Task: [#56](https://git.sendico.io/tech/sxchnge/issues/56), branch `auth-56`.
|
||||
The consumer auth form groups its mounted inputs in one `AutofillGroup` and
|
||||
declares their purpose explicitly:
|
||||
|
||||
| Input | Flutter hints | Browser autocomplete |
|
||||
| --- | --- | --- |
|
||||
| Signup name | `name` with the name keyboard | `name` |
|
||||
| Account email | `username`, then `email`, with the email keyboard | `username` |
|
||||
| Login password | `password` | `current-password` |
|
||||
| Signup password and confirmation | `newPassword` on both | `new-password` |
|
||||
|
||||
Flutter uses the first hint on web and Apple platforms. Email is the credential
|
||||
username; the email keyboard remains configured separately. Visibility toggles
|
||||
keep the password role, so autofill does not depend on detecting masked input.
|
||||
The confirmation field participates in the same group as the first password,
|
||||
allowing the browser to fill both without copying one controller into the other.
|
||||
|
||||
Signup acceptance finalizes autofill before clearing password controllers and
|
||||
navigating to email verification. Login finalizes on success; when a second
|
||||
factor is required, it waits for verification and login completion. The password
|
||||
remains only in the existing form controller during that challenge, then clears
|
||||
on completed navigation or cancellation. Invalid input, rejected credentials and
|
||||
failed verification do not request saving. Switching auth mode, abandoning the
|
||||
form or leaving for unverified-account recovery cancels the autofill context.
|
||||
Provider/service/model boundaries and existing request/outcome telemetry are
|
||||
unchanged; no field events or credential telemetry are added. Browser popup
|
||||
display and pre-submit autofill abandonment remain outside current measurement.
|
||||
|
||||
### Verification and release check
|
||||
|
||||
Focused widget tests send a platform autofill response with all four signup
|
||||
values and check EN/RU controller updates, grouped credential metadata, visibility
|
||||
changes, mode switching and abandonment. Auth tests cover validation failures,
|
||||
service rejection/retry, stale responses, signup/login acceptance, unverified
|
||||
recovery, invalid second-factor codes and cancellation without premature saving.
|
||||
Existing narrow/desktop layouts and enlarged-text tests cover the unchanged UI.
|
||||
|
||||
Native Safari verification remains a release check: computer-control permission
|
||||
was unavailable in this session. On the deployed HTTPS origin with Safari
|
||||
AutoFill enabled, focus the signup email and password fields, choose a suggested
|
||||
strong password, verify that both password fields populate, then confirm that
|
||||
login offers the saved credential. Repeat after showing/hiding passwords and
|
||||
switching modes. Browser settings, stored credentials and browser heuristics
|
||||
determine whether suggestions appear; automated Flutter tests cannot establish
|
||||
that the system popup was displayed or that credentials were saved.
|
||||
|
||||
References: [Apple Password AutoFill](https://developer.apple.com/documentation/security/enabling-password-autofill-on-an-html-input-element),
|
||||
[Flutter autofill hints](https://api.flutter.dev/flutter/material/TextField/autofillHints.html),
|
||||
and [AutofillGroup](https://api.flutter.dev/flutter/widgets/AutofillGroup-class.html).
|
||||
|
||||
Recorded validation: `dart format --output=none --set-exit-if-changed` passes for
|
||||
all five changed Dart files; `flutter analyze` passes in `frontend/app`;
|
||||
`make test-frontend` passes all 212 tests across the app and shared packages.
|
||||
`flutter build web` passes. The built page's default rendering path was inspected
|
||||
in the in-app browser: login exposes `username`/`current-password` in one HTML
|
||||
form; signup exposes `username`, `name` and two `new-password` inputs in one form.
|
||||
This verifies the browser metadata, not Safari's credential popup. With Flutter
|
||||
web accessibility semantics enabled, unfocused semantic inputs initially use
|
||||
framework-default autocomplete values until focused; password-manager behavior
|
||||
with assistive technology still requires a native browser audit.
|
||||
Reference in new issue
Block a user