Fix Bitwarden Android autofill: use valid input type for nickname field - #575
Open
madejackson wants to merge 1 commit into
Open
Fix Bitwarden Android autofill: use valid input type for nickname field#575madejackson wants to merge 1 commit into
madejackson wants to merge 1 commit into
Conversation
…droid autofill The nickname fields in AuthLogin and AuthRegister used an invalid HTML input type 'type="nickname"', which the browser coerces to text but breaks field classification on Android's Autofill Framework. As a result Bitwarden on Android could not reliably map the saved username an the nickname field. - Change nickname inputs to type="text" (keeping autocomplete="username"). - Add autocomplete="current-password" to the password field so Android recognizes the login form as a username/password pair.
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.
Android bitwarden client did not recognize the nickname field hence not offering to autofill and not autofilling when selecting a login from dropbown via password field. Only the password field gets autofilled.
Disclaimer
Written with help of Plurality ( deepseek-v4-flash-0731 )
Summary
The nickname fields on the login and registration forms were rendered with an invalid HTML input type (
type="nickname"). This breaks field classification on Android's Autofill Framework, so Bitwarden on Android could not reliably map a saved username to the nickname field (and often wouldn't offer to autofill at all).Problem details
"nickname"is not a valid HTML inputtype. Desktop browsers silently coerce it totext, which is why desktop password managers mostly work — but Android's Autofill Framework relies on accurate type + autocomplete hints to classify fields. An invalid type weakens that classification and Android refuses the fill.current-passwordhint: the password field on the login form had noautocomplete="current-password"hint. The iOS/Android autofill framework needs both halves of a recognized pair (username+current-password) before it will offer to fill a login form.Fixes
type="nickname"→type="text"in:client/src/pages/authentication/auth-forms/AuthLogin.jsxclient/src/pages/authentication/auth-forms/AuthRegister.jsxautoComplete="current-password"to the login password field so Android recognizes the nickname/password pair as a login form.Notes
name="nickname"attribute and form state handling are untouched.Want me to tweak the tone, add a screenshot/visual, or include your testing steps? Also, if you'd like, I can open the PR for you via the API using the PAT — just say the word.