fix(settings): stop browser autofilling WhatsApp account fields + clearer Meta App ID hint#53
Merged
Conversation
…arer Meta App ID hint The New/Edit WhatsApp account modal contains a password field (access token), so browsers treated it as a login form and autofilled the nearest text input (Meta App ID) with a saved username. - Mark the access-token field autoComplete="new-password" to break the browser's username-detection heuristic. - Add autoComplete="off" + non-credential name to the identity fields (phone number ID, WABA ID, verify token, Meta App ID). - Add inputMode="numeric" to the numeric ID fields. - Clarify the Meta App ID placeholder to show the expected format and length: "e.g. 1191602295745986 (15-16 digits)". Signed-off-by: KingArthur000 <sathyaprakashelango@gmail.com>
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.
Problem
The New/Edit WhatsApp account modal contains a password field (the Permanent Access Token), so browsers treat the whole modal as a login form and autofill the nearest text input — the Meta App ID field — with a saved username.
Fix
autoComplete="new-password"to break the browser's username-detection heuristic (root cause).autoComplete="off"+ a non-credentialnameto the identity fields (Phone Number ID, WABA ID, Verify Token, Meta App ID) so the autofill cannot hop to a neighbour.inputMode="numeric"to the numeric ID fields.e.g. 1191602295745986 (15–16 digits).Scope
Single file, frontend-only:
frontend/src/pages/AdminSettingsPage.jsx(6 insertions, 4 deletions). No behavioural/logic change beyond input attributes and a placeholder string.