← All articlesWeb security

How to Test Login Form Compatibility with Password Managers and MFA Code Pasting

A field filled with dots does not prove that the form passed the password correctly. Developers and product owners need a testable contract: manual entry, autofill, and pasting must pass the expected values and allow the normal login flow to complete. Here is how to test this in a fully fictional account portal using your own test accounts, without storing secrets in the test results.

What Form Compatibility Means

Password managers automate the management of many different credentials. Most can enter a password into a form by pasting it or simulating manual typing. Form testing should therefore cover several entry methods: one successful keyboard login is not enough for acceptance.

This test covers the path from filling a UI element, through input handlers, to passing the expected value to the login handler. The proposed contract is simple: every entry method tested must pass the same synthetic credentials and complete the normal login flow successfully, just as the manual positive control does.

Basic Requirements for Form Elements

OWASP recommends standard HTML forms for usernames and passwords, with type attributes appropriate to their purpose. Pasting must be allowed in username, password, and MFA fields. Users must be able to move from the username field to the password field with a single press of Tab. Include these requirements in the interface contract separately from the results for any particular password manager.

Start by inspecting the form elements, then focus the username field and press Tab once. The expected result is focus moving to the password field. Next, test normal form submission. Standard elements and correct focus movement alone do not confirm that the entire processing chain handles the entered value correctly.

Prepare a Fictional Portal and a Manual Control

All the tests below are original editorial acceptance tests, not an official OWASP procedure. Imagine a fully fictional account portal called “Mayak” in your own test environment. Create a test account you own with a synthetic username and password. For the MFA step, use a valid test code for that account.

First, enter the credentials manually and complete login. In the test handler, compare the received values with the expected values, saving only the comparison results without the secrets themselves. Do not log OTP values. The manual control passes if the values match and the portal actually reaches its intended post-login state, such as displaying your own test account page.

A successful HTTP response or the form disappearing does not replace these two observations. If the manual control fails, fix it first: otherwise, comparing autofill and pasting against it will not provide useful information.

Compare Autofill with Manual Entry

Repeat login in the same portal, using your chosen password manager to fill the username and password. Then complete the normal MFA step. The acceptance criterion remains the same: the test handler receives the expected synthetic values, and login completes just as it did in the manual control. Visibly filled fields are only an intermediate observation.

Record the tested browser and password manager combination alongside the result. Run a separate test for each different combination. Success in one environment confirms compatibility in that environment only and does not justify promising support for all password managers.

Test Password and Full MFA Code Pasting Separately

Run separate tests for pasting the username, password, and full valid test MFA code. In each run, change the entry method for the field under test and enter the remaining data using a method already verified. After pasting, submit the relevant form without typing any additional characters, so the test does not depend on subsequent manual input.

Use a valid test code for each new login. In OTP authentication, the user submits a changing numeric code, so the result of pasting must be assessed together with the code’s validity for the current test login. Do not include the code itself in reports or logs.

Each run passes under two conditions: the handler receives the expected value, and the normal login flow completes successfully. If the field looks filled but the comparison fails or login does not complete, the contract for that entry method has not yet been met.

Which Fixes to Prioritize

First, fix any detected restrictions on pasting and discrepancies between the filled field and the value passed to the handler. Check input and submission handlers: acceptance tests must pass after pasting or autofill without additional typing. If custom elements are used, change the username and password form to use the recommended standard HTML elements with appropriate type attributes.

As a separate required item, remove obstacles to moving from username to password with a single Tab press. After making fixes, repeat the manual control and previously failed scenarios. The report only needs the entry method, environment, value comparison result, and whether login completed—without passwords or OTPs.

What the Result Confirms and Where More Work Is Needed

The result of this test is a specific compatibility contract for form elements and input handlers in the environments tested. It does not assess password policy, server-side truncation, hash storage, attempt limiting, one-time use of OTPs, factor replacement, account recovery, or session lifecycles. Successful runs are also not a statistical guarantee of product security.

If you need help with your login form, you can start with a free audit of your website or the web portion of your product. Prepare a description of the tested scenarios and results without secrets for the discussion: this will help connect the issues found to the form’s observed behavior.

Sources and documentation

  1. Authentication Cheat Sheet
  2. Multifactor Authentication Cheat Sheet
CheckMyApp

Check your application’s security.

Enter your web application address and email. Get a free preliminary report and choose the depth of analysis.

Check for free