Skip to content

Commit

Permalink
Merge pull request #856 from julen/docs/signals
Browse files Browse the repository at this point in the history
Added docs for missing signals
  • Loading branch information
pennersr committed Mar 2, 2015
2 parents ef8fe4e + e8a8218 commit 59f20e2
Showing 1 changed file with 42 additions and 8 deletions.
50 changes: 42 additions & 8 deletions docs/signals.rst
Original file line number Diff line number Diff line change
@@ -1,27 +1,61 @@
Signals
=======

The following signals are emitted:
There are several signals emitted during authentication flows. You can
hook to them for your own needs.

- `allauth.account.signals.user_logged_in`

allauth.account
---------------


- `allauth.account.signals.user_logged_in(request, user)`

Sent when a user logs in.

- `allauth.account.signals.user_signed_up`
- `allauth.account.signals.user_signed_up(request, user)`

Sent when a user signs up for an account. This signal is
typically followed by a `user_logged_in`, unless e-mail verification
prohibits the user to log in.

- `email_confirmed`
- `allauth.account.signals.password_set(request, user)`

Sent when a password has been successfully set for the first time.

- `allauth.account.signals.password_changed(request, user)`

Sent when a password has been successfully changed.

- `allauth.account.signals.password_reset(request, user)`

Sent when a password has been successfully reset.

- `allauth.account.signals.email_confirmed(email_address)`

Sent after the email address in the db was updated and set to confirmed.

- `email_confirmation_sent`
- `allauth.account.signals.email_confirmation_sent(confirmation)`

Sent right after the email confirmation is sent.

- `allauth.socialaccount.signals.pre_social_login`
- `allauth.account.signals.email_changed(request, user, from_email_address, to_email_address)`

Sent when a primary email address has been changed.

- `allauth.account.signals.email_added(request, user, email_address)`

Sent when a new email address has been added.

- `allauth.account.signals.email_removed(request, user, email_address)`

Sent when an email address has been deleted.


allauth.socialaccount
---------------------

- `allauth.socialaccount.signals.pre_social_login(request, social_login)`

Sent after a user successfully authenticates via a social provider,
but before the login is fully processed. This signal is emitted as
Expand All @@ -30,11 +64,11 @@ The following signals are emitted:
tokens and profile information, if applicable for the provider, is
provided.

- `allauth.socialaccount.signals.social_account_added`
- `allauth.socialaccount.signals.social_account_added(request, sociallogin)`

Sent after a user connects a social account to a their local account.

- `allauth.socialaccount.signals.social_account_removed`
- `allauth.socialaccount.signals.social_account_removed(request, socialaccount)`

Sent after a user disconnects a social account from their local
account.

0 comments on commit 59f20e2

Please sign in to comment.