[Django] #20824: User Auth: A Complete Solution for Email Login Handling

22 views
Skip to first unread message

Django

unread,
Jul 29, 2013, 8:36:18 PM7/29/13
to django-...@googlegroups.com
#20824: User Auth: A Complete Solution for Email Login Handling
------------------------------+--------------------------------------------
Reporter: JJZolper | Owner: nobody
Type: New feature | Status: new
Component: contrib.auth | Version: 1.5
Severity: Normal | Keywords: User Auth Email Login Handling
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+--------------------------------------------
With Django 1.5 more support has been given to those Django developers who
wish to have the Email as the username. However, I think we can continue
to push onwards to a point where Django can realize a complete solution.
By following the user login with username handling but porting it for
email handling I think we can solve this issue once and for all. Currently
I have been just going online and putting together my own solution, but my
hope is with this ticket we can get everyone working together and a
finalized solution merged into Django.

--
Ticket URL: <https://code.djangoproject.com/ticket/20824>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jul 29, 2013, 9:06:53 PM7/29/13
to django-...@googlegroups.com
#20824: User Auth: A Complete Solution for Email Login Handling
-------------------------------------+-------------------------------------

Reporter: JJZolper | Owner: nobody
Type: New feature | Status: new
Component: contrib.auth | Version: 1.5
Severity: Normal | Resolution:
Keywords: User Auth Email | Triage Stage: Accepted
Login Handling | Needs documentation: 0
Has patch: 0 | Patch needs improvement: 0
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by russellm):

* needs_docs: => 0
* needs_better_patch: => 0
* needs_tests: => 0
* stage: Unreviewed => Accepted


Comment:

I'm going to accept this as a new feature. I'm almost certain I've heard
Jacob advocate for this (can't put my finger on a specific reference for
this, though, so I'll stand corrected). Regardless, I think it's the next
logical step -- both in terms of making a common use case easy, and
providing a clear worked example for "how to do it" if you want to roll
your own User model.

In terms of implementation -- this should be provided as a separate
contrib app that just contains the email-based user (plus any necssary
forms, admin etc), which is in all other respects an exact analog of the
default auth.User.

--
Ticket URL: <https://code.djangoproject.com/ticket/20824#comment:1>

Django

unread,
Sep 12, 2013, 9:53:08 PM9/12/13
to django-...@googlegroups.com
#20824: User Auth: A Complete Solution for Email Login Handling
-------------------------------------+-------------------------------------
Reporter: JJZolper | Owner: anonymous
Type: New feature | Status: assigned
Component: contrib.auth | Version: master

Severity: Normal | Resolution:
Keywords: User Auth Email | Triage Stage: Accepted
Login Handling | Needs documentation: 0
Has patch: 0 | Patch needs improvement: 0
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by JJZolper):

* owner: nobody => anonymous
* status: new => assigned
* version: 1.5 => master


--
Ticket URL: <https://code.djangoproject.com/ticket/20824#comment:2>

Django

unread,
Sep 13, 2013, 8:16:39 PM9/13/13
to django-...@googlegroups.com
#20824: User Auth: A Complete Solution for Email Login Handling
-------------------------------------+-------------------------------------
Reporter: JJZolper | Owner: anonymous
Type: New feature | Status: assigned
Component: contrib.auth | Version: master
Severity: Normal | Resolution:
Keywords: User Auth Email | Triage Stage: Accepted
Login Handling | Needs documentation: 0
Has patch: 0 | Patch needs improvement: 0
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------

Comment (by russellm):

Whoever takes on this ticket -- keep in mind that there's plenty of
existing apps in the wild doing this; we need to take a "best of breed"
approach. A couple of options to get started:

* https://github.com/Liberationtech/django-libtech-emailuser
* https://django-authtools.readthedocs.org/en/latest/

--
Ticket URL: <https://code.djangoproject.com/ticket/20824#comment:3>

Django

unread,
Sep 16, 2013, 4:02:58 PM9/16/13
to django-...@googlegroups.com
#20824: User Auth: A Complete Solution for Email Login Handling
-------------------------------------+-------------------------------------
Reporter: JJZolper | Owner: tanderegg

Type: New feature | Status: assigned
Component: contrib.auth | Version: master
Severity: Normal | Resolution:
Keywords: User Auth Email | Triage Stage: Accepted
Login Handling | Needs documentation: 0
Has patch: 1 | Patch needs improvement: 0

Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by tanderegg):

* cc: timothy.anderegg@… (added)
* owner: anonymous => tanderegg
* has_patch: 0 => 1


Comment:

Hi All -

I took a crack at creating a patch for this, which can be found here:
https://github.com/tanderegg/django/tree/ticket_20824_master

I set it up as a new contrib app called auth_email, which is basically a
clone of auth.User and associated forms and admin settings, with the
exception of using the email field as username. I also took a look at the
two apps that Russel suggested. The first one essentially implements this
feature the same way I did. The second takes a similar approach, but
includes a rewrite of many of the authentication views using Class Based
Views. I thought that was unesseccary for this patch, since I chose not
to rewrite any views and instead use those in contrib.auth.

I setup a number of basic tests that cover the new code, but I tried not
to include any that covered existing code that was already tested in
contrib.auth. There may be a few unnesseccary tests in there, but I don't
think I missed any that would be useful.

Please take a look at the code and let me know if there are any glaring
problems (this is my first time contributing to django, so be kind :). If
nothing comes up in the next day or two, I will submit a pull request.

FYI, this is based on the discussion here:
https://groups.google.com/forum/#!topic/django-developers/rb7v9kVAK3I

Thanks!

--
Ticket URL: <https://code.djangoproject.com/ticket/20824#comment:4>

Django

unread,
Nov 2, 2013, 9:07:51 PM11/2/13
to django-...@googlegroups.com
#20824: User Auth: A Complete Solution for Email Login Handling
-------------------------------------+-------------------------------------
Reporter: JJZolper | Owner: tanderegg
Type: New feature | Status: assigned
Component: contrib.auth | Version: master
Severity: Normal | Resolution:
Keywords: User Auth Email | Triage Stage: Accepted
Login Handling | Needs documentation: 0
Has patch: 1 | Patch needs improvement: 0
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------

Comment (by JJZolper):

I was going to try to move this forward more but I'm glad tanderegg is on
it. I see there has been a lot more discussion about this in this thread:
https://groups.google.com/forum/#!topic/django-developers/rb7v9kVAK3I.
Good to see it's in the works, definitely looking forward to using the
ultimate solution. I still think what Russell said here is the best idea,
basically just supplementing what exists with an auth contrib app such as
auth.EmailUser.

--
Ticket URL: <https://code.djangoproject.com/ticket/20824#comment:5>

Django

unread,
May 16, 2014, 6:29:26 AM5/16/14
to django-...@googlegroups.com
#20824: User Auth: A Complete Solution for Email Login Handling
-------------------------------------+-------------------------------------
Reporter: JJZolper | Owner: tanderegg
Type: New feature | Status: assigned
Component: contrib.auth | Version: master
Severity: Normal | Resolution:
Keywords: User Auth Email | Triage Stage: Accepted
Login Handling | Needs documentation: 1
Has patch: 1 | Patch needs improvement: 1

Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by oinopion):

* needs_better_patch: 0 => 1
* needs_docs: 0 => 1


Comment:

I've tried to test out the branch. It applies, but crashes on basic
validation, here's error output: http://pastebin.com/P7PwZqBW

--
Ticket URL: <https://code.djangoproject.com/ticket/20824#comment:6>

Django

unread,
Feb 2, 2021, 3:48:25 AM2/2/21
to django-...@googlegroups.com
#20824: User Auth: A Complete Solution for Email Login Handling
-------------------------------------+-------------------------------------
Reporter: JJZolper | Owner: (none)

Type: New feature | Status: new
Component: contrib.auth | Version: master
Severity: Normal | Resolution:
Keywords: User Auth Email | Triage Stage: Accepted
Login Handling |
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):

* owner: Tim Anderegg => (none)
* status: assigned => new


--
Ticket URL: <https://code.djangoproject.com/ticket/20824#comment:7>

Django

unread,
Mar 12, 2024, 6:41:11 AM3/12/24
to django-...@googlegroups.com
#20824: User Auth: A Complete Solution for Email Login Handling
-------------------------------------+-------------------------------------
Reporter: JJZolper | Owner: (none)
Type: New feature | Status: new
Component: contrib.auth | Version: dev
Severity: Normal | Resolution:
Keywords: User Auth Email | Triage Stage: Accepted
Login Handling |
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Ülgen Sarıkavak):

* cc: Ülgen Sarıkavak (added)

--
Ticket URL: <https://code.djangoproject.com/ticket/20824#comment:8>

Django

unread,
Nov 19, 2024, 8:14:27 AM11/19/24
to django-...@googlegroups.com
#20824: User Auth: A Complete Solution for Email Login Handling
-------------------------------------+-------------------------------------
Reporter: JJZolper | Owner: Ülgen
| Sarıkavak
Type: New feature | Status: assigned
Component: contrib.auth | Version: dev
Severity: Normal | Resolution:
Keywords: User Auth Email | Triage Stage: Accepted
Login Handling |
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Ülgen Sarıkavak):

* owner: (none) => Ülgen Sarıkavak
* status: new => assigned

--
Ticket URL: <https://code.djangoproject.com/ticket/20824#comment:9>
Reply all
Reply to author
Forward
0 new messages