Let password managers see the login fields - #458
Merged
Conversation
Give each catalog field the autofill hints, keyboard type and next/done action its descriptor implies, group them so the platform treats them as one credential, and commit the autofill context after a successful connect so a manager is offered the chance to save.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every field in the connect form was a plain
FTextFieldwith no autofill information, so the platform had nothing to classify them by and managers offered neither fill nor save.Each field now gets hints derived from its catalog descriptor rather than from any hardcoded school system: password, url, username plus email, or username, keyed off
typefirst and the fieldkeysecond. The email box also getsTextInputType.emailAddressinstead of plain text, and the form chains next/done through its fields.The fields are wrapped in an
AutofillGroupso the platform reads them as one credential, andTextInput.finishAutofillContext()runs after a connect succeeds - never after a failure, so nothing is offered for saving that did not work. The 2FA row is a picker rather than a text field, so it is left out.Checked on the emulator with Google's autofill service active: focusing the email box now produces an autofill request for that field's bounds, dispatched to
com.google.android.gms. The same action on the previous build produced no autofill entry at all.What this cannot show is an actual fill or save prompt - that needs credentials already stored for the app in a manager, which a fresh emulator has none of. Flutter's save prompt is also known to be inconsistent across services (flutter#104071).
Closes #456