skillfed

django-magiclink

Passwordless authentication for Django with Magic Links

django-magiclink v1.3.0 108.3K downloads/30d#12,564 on PyPI127
Permissive license MIT DORMANT released

What it is and what it does

django-magiclink is a Django authentication backend that replaces traditional password-based login with email-delivered magic links. Users request a login link by entering their email, receive a single-use token via email, and clicking the link logs them in automatically. The package handles token generation, validation, expiration, and optional constraints like same-browser or same-IP requirements.

Setup involves adding the app to INSTALLED_APPS, configuring URLs and authentication backends, running migrations, and customizing login templates. The package provides sensible defaults for token security, email styling, and error handling, with configuration options for signup requirements, token reuse policies, and superuser/staff login restrictions.

Use it for:

  • Replace password-based login in Django apps with email-based authentication to reduce password management burden
  • Implement frictionless signup flows where users create accounts by email alone without choosing passwords
  • Add passwordless login as an alternative authentication method alongside existing password backends
  • Build security-conscious applications where token expiry, IP binding, and browser locking reduce account compromise risk
  • Customize login and email templates to match application branding while keeping authentication logic secure

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Adds passwordless email-based authentication to Django applications using single-use magic links instead of passwords.

Yes, if you are running a Django project on a compatible version and want to add passwordless email authentication with minimal setup. The low install friction, MIT license, and 100% test coverage make it a reasonable choice. However, verify compatibility with your Django version first—the last release was 2023-07-13 and maintenance is dormant, so test thoroughly before deploying to production.

Install

django-magiclink on PyPI

pip

pip install django-magiclink

uv

uv add django-magiclink

poetry

poetry add django-magiclink

Installing django-magiclink

Before you install

Low install friction with only Django and packaging as runtime dependencies. Maintenance is dormant—last release was 2023-07-13, over a year ago, though the repository remains active with no archived status.

License in practice

MIT license permits free use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial projects.

Quickstart

pip install django-magiclink

# In settings.py:
INSTALLED_APPS = [..., 'magiclink']
AUTHENTICATION_BACKENDS = ('magiclink.backends.MagicLinkBackend', ...)
LOGIN_URL = 'magiclink:login'

# In urls.py:
path('auth/', include('magiclink.urls', namespace='magiclink'))

# Then run:
python manage.py migrate magiclink

Requires Django and Python 3.6+; you must create custom login and email templates to match your application's design.

Verify before relying

  • Whether the package works with Django versions released after 2023-07-13
  • Current compatibility with modern Django LTS versions
  • Whether dormant status indicates the package is stable or no longer maintained

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.6,<4.0)
Install friction low — pure-Python wheel
Runtime dependencies 2 — Django, packaging
Maintenance dormant — 1,128 days since the last release
Last repo commit
First released
Downloads 108,283/month — #12,564 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: django_magiclink-1.3.0-py3-none-any.whl

Keywords: magic link, authentication, passwordless

License :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

django passwordless authenticationmagic link loginemail token authenticationdjango passwordless emailsingle-use token logindjango magic linkemail-based auth django
authenticationpasswordlessdjango

More Dynamic Content packages