#8274 closed (fixed)
Auth views should allow form customization
Reported by: | Julien Phalip | Owned by: | Julien Phalip |
---|---|---|---|
Component: | contrib.auth | Version: | dev |
Severity: | Keywords: | ||
Cc: | philipe.rp@…, Dave Naffziger, bthomas@…, Freark van der Bos, steph, graham@…, michel@…, ben@…, MonteDavidoff, bas@… | 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 ¶
It is possible to make your own authentication backend. However, if you want to authenticate with usernames longer than 30 characters (e.g. emails) you cannot rely on the login view, since it's bound to use the AuthenticationForm, which itself only allows 30 characters usernames. You could easily find a way around if only the form was customizable.
Curiously, some views already allow form customization -- password_reset_confirm
and password_reset
-- but the others don't -- login
and password_change
--. The attached patch fixes the latter.
Change History (19)
by , 16 years ago
Attachment: | 8274.auth_forms.diff added |
---|
comment:1 by , 16 years ago
milestone: | 1.0 → 1.0 maybe |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 16 years ago
comment:3 by , 16 years ago
milestone: | 1.0 maybe → post-1.0 |
---|
comment:4 by , 16 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
#9168 was closed as dupe but contains a good addition to the docs for custom auth backends.
by , 16 years ago
Attachment: | authentication_form.diff added |
---|
comment:5 by , 16 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
Ok, here's a patch with both changes and docs.
It also makes the password_change_form
use keyword arguments for niceness (and patch is a bit bigger because my editor strips trailing whitespace).
comment:6 by , 16 years ago
Cc: | added |
---|
comment:7 by , 16 years ago
Cc: | added |
---|
comment:8 by , 16 years ago
Cc: | added |
---|
comment:10 by , 16 years ago
Cc: | added |
---|
comment:11 by , 16 years ago
Cc: | added |
---|
comment:12 by , 16 years ago
Cc: | added |
---|
comment:13 by , 15 years ago
Cc: | added |
---|
comment:14 by , 15 years ago
Cc: | added |
---|
Any plans on adopting this? Does this need to be associated with a milestone again to get checked in?
comment:15 by , 15 years ago
Cc: | added |
---|
comment:17 by , 14 years ago
Cc: | added |
---|
Just a note: the same request has been checked in for password reset views, see #6905.