Opened 6 years ago

Last modified 5 years ago

#29379 closed New feature

Add autocomplete attribute to contrib.auth fields — at Version 1

Reported by: CHI Cheng Owned by: nobody
Component: contrib.auth Version: dev
Severity: Normal Keywords:
Cc: Jeff Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by CHI Cheng)

Add autocomplete=username/email/current-password/new-password to contrib.auth builtin forms.

Pull request: https://github.com/django/django/pull/9921

The most useful one is autocomplete=new-password, which prevents browsers prefill with current password, Chrome will also suggest a random strong password for users who turned on account sync.

Related docs:
https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill
https://www.chromium.org/developers/design-documents/form-styles-that-chromium-understands
https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion#The_autocomplete_attribute_and_login_fields

Change History (1)

comment:1 by CHI Cheng, 6 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.
Back to Top