Vue d'ensemble

Django Allauth 0.58, publie le 1er fevrier 2024, ajoute le support MFA (authentification multi-facteurs) integre et ameliore les providers sociaux.

Fonctionnalites principales

Authentification MFA

Le module allauth.mfa ajoute le support TOTP et codes de recuperation, integre directement dans le flux d'authentification.

python
# settings.py
INSTALLED_APPS = [
    'allauth',
    'allauth.account',
    'allauth.mfa',       # nouveau
    'allauth.socialaccount',
]

MFA_ADAPTER = 'allauth.mfa.adapter.DefaultMFAAdapter'
MFA_SUPPORTED_TYPES = ['totp', 'recovery_codes']

Providers ameliores

Les providers sociaux beneficient d'une API simplifiee et du support de nouveaux fournisseurs d'identite.

python
# settings.py
SOCIALACCOUNT_PROVIDERS = {
    'google': {
        'SCOPE': ['profile', 'email'],
        'AUTH_PARAMS': {'access_type': 'online'},
        'APP': {
            'client_id': '...',
            'secret': '...',
        },
    },
}

Sources