You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need to know when a user is created by the authenticate method of the SocialAuthBackend.
Use case: when a user is automatically created by django-social-auth, I write a specific message (with the help of the messages framework) which can be only done in a request context.
I know there is a signal named socialauth_registered which is launched when a user is created but for the need of my application I have to interact with the request object.
When I look into the authenticate method of the SocialAuthBackend I find the is_new variable which is True when a user is created.
Is there any way to return this value in the authenticate process?
I also have a quick solution based on django.contrib.auth.backends.authenticate which can be done in l.150 of social_auth/backends/init.py:
user.is_new = is_new
return user
Thanks again.
The text was updated successfully, but these errors were encountered:
Hi again,
I need to know when a user is created by the authenticate method of the SocialAuthBackend.
Use case: when a user is automatically created by django-social-auth, I write a specific message (with the help of the messages framework) which can be only done in a request context.
I know there is a signal named socialauth_registered which is launched when a user is created but for the need of my application I have to interact with the request object.
When I look into the authenticate method of the SocialAuthBackend I find the is_new variable which is True when a user is created.
Is there any way to return this value in the authenticate process?
I also have a quick solution based on django.contrib.auth.backends.authenticate which can be done in l.150 of social_auth/backends/init.py:
Thanks again.
The text was updated successfully, but these errors were encountered: