In my app I am using standard auth module and social auth plugin.
I want to detect if user is registering via oauth or standard method
I have function registered to post_save signal:
def create_user_profile(sender, instance, created, **kwargs):
if created:
key, expires = UserProfile.generate_activation_data()
return UserProfile.objects.create(user=instance, activation_key=key, key_expires=expires)
post_save.connect(create_user_profile, sender=User)
But when user is registered via oauth I would to avoid creating activation data, instead set some field indicated that user is register by oauth.
Could someone give me any advice?
Add a pipeline method that sets a flag in the user instance, something like this:
Also you could check if the user has any
UserSocialAuthinstance releated with: