用户注销时社交身份验证应用程序 django 完整性错误
social auth app django integrity error when user is logged out
我正在尝试将 Facebook 登录集成到我的应用程序中。当我将一个 facebook 帐户关联到用户然后注销时,如果用户断开了他的 facebook 并且当我单击使用 facebook 登录时,使用 facebook 的登录将作为 intended.But 工作,我在 :
IntegrityError at /oauth/complete/facebook/
duplicate key value violates unique constraint "accounts_user_email_key"
DETAIL: Key (email)=() already exists.
我正在使用 social-auth-app-django
在我的 settings.py 中,我有:
DEFAULT_AUTH_PIPELINE = (
'social_core.pipeline.social_auth.social_details',
'social_core.pipeline.social_auth.social_uid',
'social_core.pipeline.social_auth.auth_allowed',
'social_core.pipeline.social_auth.social_user',
'social_core.pipeline.user.get_username',
'social_core.pipeline.mail.mail_validation',
'social_core.pipeline.social_auth.associate_by_email',
'social_core.pipeline.user.create_user',
'social_core.pipeline.social_auth.associate_user',
'social_core.pipeline.social_auth.load_extra_data',
'social_core.pipeline.user.user_details'
)
重新排序管道成功了!:
SOCIAL_AUTH_PIPELINE = (
'social_core.pipeline.user.get_username',
'social_core.pipeline.mail.mail_validation',
'social_core.pipeline.social_auth.social_uid',
'social_core.pipeline.social_auth.associate_user',
'social_core.pipeline.social_auth.load_extra_data',
'social_core.pipeline.user.user_details',
'social_core.pipeline.social_auth.social_details',
'social_core.pipeline.social_auth.auth_allowed',
'social_core.pipeline.social_auth.social_user',
)
我正在尝试将 Facebook 登录集成到我的应用程序中。当我将一个 facebook 帐户关联到用户然后注销时,如果用户断开了他的 facebook 并且当我单击使用 facebook 登录时,使用 facebook 的登录将作为 intended.But 工作,我在 :
IntegrityError at /oauth/complete/facebook/
duplicate key value violates unique constraint "accounts_user_email_key"
DETAIL: Key (email)=() already exists.
我正在使用 social-auth-app-django
在我的 settings.py 中,我有:
DEFAULT_AUTH_PIPELINE = (
'social_core.pipeline.social_auth.social_details',
'social_core.pipeline.social_auth.social_uid',
'social_core.pipeline.social_auth.auth_allowed',
'social_core.pipeline.social_auth.social_user',
'social_core.pipeline.user.get_username',
'social_core.pipeline.mail.mail_validation',
'social_core.pipeline.social_auth.associate_by_email',
'social_core.pipeline.user.create_user',
'social_core.pipeline.social_auth.associate_user',
'social_core.pipeline.social_auth.load_extra_data',
'social_core.pipeline.user.user_details'
)
重新排序管道成功了!:
SOCIAL_AUTH_PIPELINE = (
'social_core.pipeline.user.get_username',
'social_core.pipeline.mail.mail_validation',
'social_core.pipeline.social_auth.social_uid',
'social_core.pipeline.social_auth.associate_user',
'social_core.pipeline.social_auth.load_extra_data',
'social_core.pipeline.user.user_details',
'social_core.pipeline.social_auth.social_details',
'social_core.pipeline.social_auth.auth_allowed',
'social_core.pipeline.social_auth.social_user',
)