Skip to content

Fix autocomplete behaviour in Firefox

Julian requested to merge fix-autocomplete into master

Firefox autofills all type="password" inputs with passwords from its built-in password store. This breaks usability of admin pages.

This change fixes that by adding autocomplete="new-password" to these inputs. It also adds appropriate autocomplete attributes to other forms/inputs to improve autocomplete behaviour:

  • autocomplete="off" on all non-login/signup/selfservice forms
  • autocomplete="new-password" or autocomplete="current-password" on all type="password" inputs to workaround Firefox's misdetection
  • autocomplete="one-time-code" on TOTP code input fields (behaves the same as "off" in Firefox/Chromium)
  • autocomplete="username"/"email"/"nickname" on login/signup/selfservice inputs wherever appropriate
Edited by Julian

Merge request reports