Overview
django-allauth provides signals that allow you to hook into various authentication and account management events. These signals enable you to execute custom logic when specific actions occur.Authentication Signals
user_logged_in
Sent when a user successfully logs in.type
The User model class.
HttpRequest
The HTTP request object.
User
The user who logged in.
user_logged_out
Sent when a user logs out. This is Django’s built-in signal, re-exported for convenience.type
The User model class.
HttpRequest
The HTTP request object.
User
The user who logged out.
user_signed_up
Sent when a new user completes signup. Typically followed byuser_logged_in unless email verification is required.
type
The User model class.
HttpRequest
The HTTP request object.
User
The newly created user.
Password Signals
password_set
Sent when a user sets their password for the first time (e.g., social account user adding password).type
The User model class.
HttpRequest
The HTTP request object.
User
The user whose password was set.
password_changed
Sent when a user changes their existing password.type
The User model class.
HttpRequest
The HTTP request object.
User
The user whose password was changed.
password_reset
Sent when a user completes password reset via the reset flow.type
The User model class.
HttpRequest
The HTTP request object.
User
The user whose password was reset.
Email Signals
email_confirmed
Sent when a user confirms their email address.type
The EmailAddress model class.
HttpRequest
The HTTP request object.
EmailAddress
The confirmed EmailAddress object.
email_confirmation_sent
Sent when an email confirmation is sent.type
The EmailConfirmation model class.
HttpRequest
The HTTP request object.
EmailConfirmation
The EmailConfirmation object.
bool
Whether this is during signup.
email_added
Sent when a user adds a new email address to their account.type
The User model class.
HttpRequest
The HTTP request object.
User
The user adding the email.
EmailAddress
The newly added EmailAddress object.
email_removed
Sent when a user removes an email address from their account.type
The User model class.
HttpRequest
The HTTP request object.
User
The user removing the email.
EmailAddress
The removed EmailAddress object.
email_changed
Sent when a user’s primary email address is changed.type
The User model class.
HttpRequest
The HTTP request object.
User
The user whose email changed.
EmailAddress
The previous primary email address.
EmailAddress
The new primary email address.
Authentication Step Signal
authentication_step_completed
Sent when an authentication step is completed (e.g., TOTP, WebAuthn, reauthentication).type
The User model class.
HttpRequest
The HTTP request object.
User
The user completing the step.
str
The authentication method (e.g., ‘totp’, ‘webauthn’, ‘password’).
dict
Additional method-dependent keyword arguments.
Complete Usage Example
Internal Signals
_add_email
Provides arguments:sender, email, user