-
-
Save kouroshshafi/1662930 to your computer and use it in GitHub Desktop.
Thanks for this snippet. I'm having a problem with it where it is creating two new users when I call the signal. Without the signal, the behavior is correct. Have you run into anything like this with your code?
@dmeehan. No I have not faced such a problem; try commenting this line! because if I turn this line on, I get some other kind of errors.
SOCIAL_AUTH_USER_MODEL = 'myapp.CustomUser'
(from https://django-social-auth.readthedocs.org/en/v0.7.18/signals.html)
"Take into account that when defining a custom User model and declaring signal handler in models.py, the imports and handler definition must be made after the custom User model is defined or circular imports issues will be raised."
Signals are deprecated is Django SocialAuth, pipeline methods have to be used now.
from social_auth.signals.py:
"This module is deprecated, this signals aren't used by the code anymore and it's functionality should be replaced by pipeline methods."
Is this still working? I can't get profile picture from Goolge. Im I have to update something?
In settings, you need just to define
AUTH_PROFILE_MODULE= 'profiles.UserProfile'
profile is the name of my app and UserProfile is the name of the User class. Read more about AUTH_PROFILE_MODULE on django docs.