Overview
Django Allauth 0.58, released on February 1, 2024, adds built-in MFA (multi-factor authentication) support and improves social providers.
Main Features
MFA authentication
The allauth.mfa module adds TOTP and recovery code support, integrated directly into the authentication flow.
python
# settings.py
INSTALLED_APPS = [
'allauth',
'allauth.account',
'allauth.mfa', # new
'allauth.socialaccount',
]
MFA_ADAPTER = 'allauth.mfa.adapter.DefaultMFAAdapter'
MFA_SUPPORTED_TYPES = ['totp', 'recovery_codes']
Improved providers
Social providers benefit from a simplified API and support for new identity providers.
python
# settings.py
SOCIALACCOUNT_PROVIDERS = {
'google': {
'SCOPE': ['profile', 'email'],
'AUTH_PARAMS': {'access_type': 'online'},
'APP': {
'client_id': '...',
'secret': '...',
},
},
}
