我正在使用django-allauth进行身份验证系统。 当用户登录时,我需要使用提供者信息(在我的情况下是Facebook)填充配置文件模块。
我尝试使用pre_social_login信号,但我不知道如何从提供者身份验证中检索数据。
from django.dispatch import receiver
from allauth.socialaccount.signals import pre_social_login
@receiver(pre_social_login)
def populate_profile(sender, **kwargs):
u = UserProfile( >>FACEBOOK_DATA<< )
u.save()
谢谢!!!