Disclaimer: I am writing this to learn more about custom authentication in django. Inspired by Is it time for password-less login? by Ben Brown
Run this command to install django-nopassword
pip install django-nopassword
Django >= 1.4 (1.5 custom user is supported)
Add the app to installed apps
INSTALLED_APPS = (
...
'django_nopassword',
...
)
Set the authentication backend to EmailBackend
AUTHENTICATION_BACKENDS = ( 'django_nopassword.backends.EmailBackend', )
Add urls to your urls.py
urlpatterns = patterns('',
...
url(r'^accounts/', include('django_nopassword.urls')),
...
)
default: 900
(15 minutes)
Defines how long a login code is valid in seconds.
default: False
Activates autocomplete in login form. Be aware of the potensial security risk and privacy risk by publicly viewing all usernames and full names. Only do this if you are certain your users would not mind.
default: False
If set to True, the login url will not contain
default: Login code
Sets Email Subject for Login Emails
default: example.com
default: root@example.com