Skip to main content

Prerequisites

Before installing django-allauth, ensure your environment meets the following requirements:

Python

Python 3.8 or higher

Django

Django 4.2 or higher
If you’re using MySQL with InnoDB and the utf8mb4 charset on versions lower than 5.7.7, you may need to adjust ACCOUNT_EMAIL_MAX_LENGTH due to index size limitations.

Installation Methods

Choose your preferred package manager to install django-allauth:

Basic Installation

For basic account functionality without social authentication:
pip install django-allauth

With Social Account Support

For full functionality including social authentication providers:
pip install "django-allauth[socialaccount]"

With Additional Features

Install with specific optional dependencies:
# Multi-factor authentication (MFA)
pip install "django-allauth[mfa]"

# SAML 2.0 support
pip install "django-allauth[saml]"

# Headless API support
pip install "django-allauth[headless]"

# All features
pip install "django-allauth[socialaccount,mfa,saml,headless]"

Optional Dependencies

Understanding what each optional dependency provides:
Required dependencies:
  • oauthlib >= 3.3.0,<4
  • requests >= 2.0.0,<3
  • pyjwt[crypto] >= 2.0,<3
Enables authentication with 100+ social providers including:
  • Google, Facebook, GitHub, Twitter
  • Microsoft, LinkedIn, Apple
  • And many more…
Required dependencies:
  • qrcode >= 7.0.0,<9
  • fido2 >= 1.1.2,<3
Adds support for:
  • TOTP (Time-based One-Time Password)
  • WebAuthn / Passkeys
  • Recovery codes
Required dependencies:
  • python3-saml>=1.15.0,<2.0.0
Enables SAML 2.0 for enterprise SSO solutions.
Required dependencies:
  • pyjwt[crypto] >= 2.0,<3
Provides RESTful API for:
  • Single-page applications (React, Vue, Angular)
  • Mobile applications
  • Headless CMS integrations
Required dependencies:
  • python3-openid >= 3.0.8,<4
Adds support for OpenID protocol.
Required dependencies:
  • python3-openid >= 3.0.8,<4
Enables authentication via Steam.

Verification

Verify that django-allauth is installed correctly:
python -c "import allauth; print(allauth.__version__)"
Expected output:
65.14.3
import allauth

print(f"django-allauth version: {allauth.__version__}")
print(f"Title: {allauth.__title__}")
print(f"Author: {allauth.__author__}")

Python & Django Version Matrix

django-allauth supports the following combinations:
Python VersionDjango Versions
3.84.2+
3.94.2+
3.104.2+, 5.0, 5.1, 5.2
3.114.2+, 5.0, 5.1, 5.2
3.124.2+, 5.0, 5.1, 5.2, 6.0
3.134.2+, 5.0, 5.1, 5.2, 6.0
django-allauth follows Django’s supported versions policy. Older versions may work but are not officially tested or supported.

Development Installation

For contributing to django-allauth or testing the latest features:
# Clone the repository
git clone https://codeberg.org/allauth/django-allauth.git
cd django-allauth

# Install in development mode
pip install -e ".[socialaccount,mfa,saml,headless]"

# Run tests
python manage.py test

Troubleshooting

Ensure django-allauth is installed in your active Python environment:
pip list | grep django-allauth
If not listed, reinstall:
pip install django-allauth
Check for conflicting dependencies:
pip check
Consider using a virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
pip install django-allauth
If using MySQL with InnoDB and utf8mb4 charset (versions < 5.7.7), add to your settings:
settings.py
ACCOUNT_EMAIL_MAX_LENGTH = 191
This reduces the email field length to accommodate the larger character size in utf8mb4.

What’s Next?

Quickstart Guide

Configure django-allauth and get your authentication system up and running

Introduction

Learn more about django-allauth features and architecture

Build docs developers (and LLMs) love