Name | django-mail-auth JSON |
Version |
3.2.2
JSON |
| download |
home_page | |
Summary | Django authentication via login URLs, no passwords required. |
upload_time | 2023-10-24 16:28:41 |
maintainer | |
docs_url | None |
author | |
requires_python | >=3.9 |
license | |
keywords |
django
otp
email
authentication
passwordless
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
================
Django Mail Auth
================
|version| |docs| |coverage| |license|
.. figure:: sample.png
:width: 425
:alt: screenshot from a login form
Django Mail Auth is a lightweight authentication backend for Django,
that does not require users to remember passwords.
Django Mail Auth features:
- custom user model support
- drop in Django admin support
- drop in Django User replacement
- drop in Wagtail login replacement
- extendable SMS support
This project was inspired by:
- `Is it time for password-less login?`_ by `Ben Brown`_
- `LOGIN WITHOUT PASSWORD MOST SECURE | WAIT.. WHAT?`_ by `Joris Snoek`_
- `django-nopassword`_ by `Rolf Erik Lekang`_
.. _`Rolf Erik Lekang`: http://rolflekang.com
.. _`django-nopassword`: https://github.com/relekang/django-nopassword
.. _`Is it time for password-less login?`: http://notes.xoxco.com/post/27999787765/is-it-time-for-password-less-login
.. _`LOGIN WITHOUT PASSWORD MOST SECURE | WAIT.. WHAT?`: https://www.lucius.digital/en/blog/login-without-password-most-secure-wait-what
.. _`Ben Brown`: http://twitter.com/benbrown
.. _`Joris Snoek`: https://twitter.com/lucius_digital
Installation
------------
Run this command to install ``django-mail-auth``::
python3 -m pip install django-mail-auth[wagtail]
Setup
-----
First add ``mailauth`` to you installed apps:
.. code-block:: python
INSTALLED_APPS = [
# Django's builtin apps…
'mailauth',
'mailauth.contrib.admin', # optional
'mailauth.contrib.user', # optional
# optional, must be included before "wagtail.admin"
'mailauth.contrib.wagtail',
# other apps…
]
``mailauth.contrib.admin`` is optional and will replace the admin's login
with token based authentication too.
``mailauth.contrib.user`` is optional and provides a new Django User model.
The new User model needs to be enabled via the ``AUTH_USER_MODEL`` setting:
.. code-block:: python
# This setting should be either "EmailUser" or
# any custom subclass of "AbstractEmailUser"
AUTH_USER_MODEL = 'mailauth_user.EmailUser'
# optional, Wagtail only
WAGTAILUSERS_PASSWORD_ENABLED = False
Next you will need to add the new authentication backend:
.. code-block:: python
AUTHENTICATION_BACKENDS = (
# default, but now optional
# This should be removed if you use mailauth.contrib.user or any other
# custom user model that does not have a username/password
'django.contrib.auth.backends.ModelBackend',
# The new access token based authentication backend
'mailauth.backends.MailAuthBackend',
)
Django's ``ModelBackend`` is only needed, if you still want to support
password based authentication. If you don't, simply remove it from the list.
Last but not least, go to your URL root configuration ``urls.py`` and add the following:
.. code-block:: python
from django.urls import path
urlpatterns = [
path('accounts/', include('mailauth.urls')),
# optional, must be before "wagtail.admin.urls"
path('', include('mailauth.contrib.wagtail.urls')),
]
That's it!
.. note:: Don't forget to setup you Email backend!
.. |version| image:: https://img.shields.io/pypi/v/django-mail-auth.svg
:target: https://pypi.python.org/pypi/django-mail-auth/
.. |coverage| image:: https://codecov.io/gh/codingjoe/django-mail-auth/branch/main/graph/badge.svg
:target: https://codecov.io/gh/codingjoe/django-mail-auth
.. |license| image:: https://img.shields.io/badge/license-MIT-blue.svg
:target: :target: https://raw.githubusercontent.com/codingjoe/django-mail-auth/main/LICENSE
.. |docs| image:: https://readthedocs.org/projects/django-mail-auth/badge/?version=latest
:target: https://django-mail-auth.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status
Raw data
{
"_id": null,
"home_page": "",
"name": "django-mail-auth",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": "",
"keywords": "django,otp,email,authentication,passwordless",
"author": "",
"author_email": "Johannes Maron <johannes@maron.family>",
"download_url": "https://files.pythonhosted.org/packages/3b/ee/889226d2abb58188e6196a419c3556e4444bbca0a04d3f428ff4f1d46eb2/django_mail_auth-3.2.2.tar.gz",
"platform": null,
"description": "================\nDjango Mail Auth\n================\n\n|version| |docs| |coverage| |license|\n\n.. figure:: sample.png\n :width: 425\n :alt: screenshot from a login form\n\nDjango Mail Auth is a lightweight authentication backend for Django,\nthat does not require users to remember passwords.\n\nDjango Mail Auth features:\n\n- custom user model support\n- drop in Django admin support\n- drop in Django User replacement\n- drop in Wagtail login replacement\n- extendable SMS support\n\nThis project was inspired by:\n\n- `Is it time for password-less login?`_ by `Ben Brown`_\n- `LOGIN WITHOUT PASSWORD MOST SECURE | WAIT.. WHAT?`_ by `Joris Snoek`_\n- `django-nopassword`_ by `Rolf Erik Lekang`_\n\n\n.. _`Rolf Erik Lekang`: http://rolflekang.com\n.. _`django-nopassword`: https://github.com/relekang/django-nopassword\n.. _`Is it time for password-less login?`: http://notes.xoxco.com/post/27999787765/is-it-time-for-password-less-login\n.. _`LOGIN WITHOUT PASSWORD MOST SECURE | WAIT.. WHAT?`: https://www.lucius.digital/en/blog/login-without-password-most-secure-wait-what\n.. _`Ben Brown`: http://twitter.com/benbrown\n.. _`Joris Snoek`: https://twitter.com/lucius_digital\n\nInstallation\n------------\n\nRun this command to install ``django-mail-auth``::\n\n python3 -m pip install django-mail-auth[wagtail]\n\nSetup\n-----\n\nFirst add ``mailauth`` to you installed apps:\n\n.. code-block:: python\n\n INSTALLED_APPS = [\n # Django's builtin apps\u2026\n\n 'mailauth',\n\n 'mailauth.contrib.admin', # optional\n 'mailauth.contrib.user', # optional\n\n # optional, must be included before \"wagtail.admin\"\n 'mailauth.contrib.wagtail',\n\n\n # other apps\u2026\n ]\n\n``mailauth.contrib.admin`` is optional and will replace the admin's login\nwith token based authentication too.\n\n``mailauth.contrib.user`` is optional and provides a new Django User model.\nThe new User model needs to be enabled via the ``AUTH_USER_MODEL`` setting:\n\n.. code-block:: python\n\n # This setting should be either \"EmailUser\" or\n # any custom subclass of \"AbstractEmailUser\"\n AUTH_USER_MODEL = 'mailauth_user.EmailUser'\n\n # optional, Wagtail only\n WAGTAILUSERS_PASSWORD_ENABLED = False\n\n\nNext you will need to add the new authentication backend:\n\n.. code-block:: python\n\n AUTHENTICATION_BACKENDS = (\n # default, but now optional\n # This should be removed if you use mailauth.contrib.user or any other\n # custom user model that does not have a username/password\n 'django.contrib.auth.backends.ModelBackend',\n\n # The new access token based authentication backend\n 'mailauth.backends.MailAuthBackend',\n )\n\nDjango's ``ModelBackend`` is only needed, if you still want to support\npassword based authentication. If you don't, simply remove it from the list.\n\nLast but not least, go to your URL root configuration ``urls.py`` and add the following:\n\n.. code-block:: python\n\n from django.urls import path\n\n\n urlpatterns = [\n path('accounts/', include('mailauth.urls')),\n\n # optional, must be before \"wagtail.admin.urls\"\n path('', include('mailauth.contrib.wagtail.urls')),\n ]\n\nThat's it!\n\n.. note:: Don't forget to setup you Email backend!\n\n.. |version| image:: https://img.shields.io/pypi/v/django-mail-auth.svg\n :target: https://pypi.python.org/pypi/django-mail-auth/\n.. |coverage| image:: https://codecov.io/gh/codingjoe/django-mail-auth/branch/main/graph/badge.svg\n :target: https://codecov.io/gh/codingjoe/django-mail-auth\n.. |license| image:: https://img.shields.io/badge/license-MIT-blue.svg\n :target: :target: https://raw.githubusercontent.com/codingjoe/django-mail-auth/main/LICENSE\n.. |docs| image:: https://readthedocs.org/projects/django-mail-auth/badge/?version=latest\n :target: https://django-mail-auth.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n\n",
"bugtrack_url": null,
"license": "",
"summary": "Django authentication via login URLs, no passwords required.",
"version": "3.2.2",
"project_urls": {
"Changelog": "https://github.com/codingjoe/django-mail-auth/releases",
"Documentation": "https://django-mail-auth.rtfd.io/",
"Issue-Tracker": "https://github.com/codingjoe/django-mail-auth/issues",
"Project-URL": "https://github.com/codingjoe/django-mail-auth",
"Source": "https://github.com/codingjoe/django-mail-auth"
},
"split_keywords": [
"django",
"otp",
"email",
"authentication",
"passwordless"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "99d46df1d199291f8558ca6c3a7db55e125dff07ee21ce5e2b8df16dc3f2340b",
"md5": "83328f201e5ec7325fb03d824f1b8281",
"sha256": "77069c9b3318babe559c2f845f529e6873955167b66af53f3782115d78da52b9"
},
"downloads": -1,
"filename": "django_mail_auth-3.2.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "83328f201e5ec7325fb03d824f1b8281",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 25199,
"upload_time": "2023-10-24T16:28:39",
"upload_time_iso_8601": "2023-10-24T16:28:39.585830Z",
"url": "https://files.pythonhosted.org/packages/99/d4/6df1d199291f8558ca6c3a7db55e125dff07ee21ce5e2b8df16dc3f2340b/django_mail_auth-3.2.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "3bee889226d2abb58188e6196a419c3556e4444bbca0a04d3f428ff4f1d46eb2",
"md5": "bf7985c80f20f40bd30bb3ccf64c0f16",
"sha256": "9ee49c03c2c551d3634a4e9eceea79a236a4df538f56745dc4d73997280c6604"
},
"downloads": -1,
"filename": "django_mail_auth-3.2.2.tar.gz",
"has_sig": false,
"md5_digest": "bf7985c80f20f40bd30bb3ccf64c0f16",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 17159,
"upload_time": "2023-10-24T16:28:41",
"upload_time_iso_8601": "2023-10-24T16:28:41.476356Z",
"url": "https://files.pythonhosted.org/packages/3b/ee/889226d2abb58188e6196a419c3556e4444bbca0a04d3f428ff4f1d46eb2/django_mail_auth-3.2.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-10-24 16:28:41",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "codingjoe",
"github_project": "django-mail-auth",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "django-mail-auth"
}