Skip to main content

Overview

This guide helps you upgrade django-allauth to newer versions safely and efficiently. Always review the Changelog and Breaking Changes before upgrading.

General Upgrade Process

1

Review the Changelog

Check the Changelog for all versions between your current version and the target version. Pay special attention to:
  • Security notices
  • Breaking changes
  • Deprecated features
  • New configuration requirements
2

Update Dependencies

Update django-allauth in your requirements file:
Check if you need to update optional dependencies:
3

Run Database Migrations

Apply any new database migrations:
Always backup your database before running migrations in production.
4

Update Configuration

Review and update your settings based on the changelog:
  • Add new required settings
  • Update deprecated settings
  • Review security-related configuration changes
5

Test Thoroughly

Test all authentication flows:
  • Local signup and login
  • Social authentication
  • Password reset
  • Email verification
  • MFA if enabled
  • API endpoints if using headless mode

Upgrading to 65.x

Security: IP Address Detection

Starting with version 65.14.2, X-Forwarded-For is distrusted by default for IP address detection.
You must configure IP detection based on your deployment: Option 1: Configure Trusted Proxy Count
settings.py
Option 2: Use Trusted Client IP Header
settings.py
Option 3: Custom Implementation
adapters.py

Django 6.0 Support

Django 6.0 is officially supported as of version 65.13.1. No configuration changes required.

Headless JWT Algorithm

The JWT algorithm is now configurable (version 65.14.0):
settings.py

Upgrading to 64.x

Python Version Requirements

Django Allauth 64.x requires Python 3.8 or higher. If you’re on Python 3.7 or earlier:
  1. Upgrade Python to 3.8+
  2. Test your application thoroughly
  3. Then upgrade django-allauth

Template Changes

Version 64 introduced the element-based styling system. If you have custom templates:
settings.py
Or continue using legacy templates:
settings.py

Version-Specific Upgrade Notes

Rate Limiting Security

The default behavior for IP address detection has changed. See the security section above.

SAML RelayState Security

If you use SAML with IdP-initiated SSO enabled:
settings.py

Template System Updates

The element-based template system was introduced. Custom templates may need updates.

Form Changes

Some form fields and validation logic changed. Review custom forms.

Settings Reorganization

Some settings were renamed or reorganized:
No breaking changes in settings, but new options available.

Testing Your Upgrade

Automated Tests

Add these tests to verify the upgrade:
tests.py

Manual Testing Checklist

  • Signup with email
  • Login with username/email
  • Password reset flow
  • Email verification
  • Social login (test each provider you use)
  • MFA enrollment and authentication
  • Account management (change email, change password)
  • Headless API endpoints (if applicable)
  • Rate limiting works correctly
  • Admin panel access

Rollback Plan

If issues occur after upgrading:
1

Restore Database Backup

Restore your database from the backup taken before migration
2

Downgrade Package

Pin to the previous version:
3

Reverse Migrations

If you applied new migrations:

Getting Help

If you encounter issues during upgrade:

Stack Overflow

Ask questions with the django-allauth tag

Issue Tracker

Report bugs or unexpected behavior

Breaking Changes

Review detailed breaking changes

Changelog

See all version changes