我懷疑錯誤的原因,但我不知道如何解決它,這是發生了什麼事:Python社交認證。用戶登錄創建新的用戶,而不是使用現有
我的本地數據庫,然後在做了pg_dump
在Heroku的生產數據庫上的pg_restore
。現在,當某個已有用戶名的用戶嘗試登錄(使用Facebook或Google等)時,PSA會創建一個新用戶,並在末尾添加一個隨機數,而不是登錄現有用戶。
例如,用戶與用戶名JohnSmith對日誌與FB,因爲JohnSmith對在數據庫中已經存在,它會創建用戶名新用戶JohnSmit654f6b654
我想我來恢復數據庫備份不知何故沒」的pg_restore
包括一些重要的psa表。我想知道我應該手動恢復哪些Python Social Auth表,以便它能正常工作。或者......也許這是錯誤的原因。謝謝你的幫助。
順便說一句,我在Heroku上使用Django 1.8。
編輯
我的社會身份驗證管道:
SOCIAL_AUTH_PIPELINE = (
'social.pipeline.social_auth.social_details',
'social.pipeline.social_auth.social_uid',
'social.pipeline.social_auth.auth_allowed',
'social.pipeline.social_auth.social_user',
'social.pipeline.user.get_username',
'social.pipeline.user.create_user',
'social.pipeline.social_auth.associate_user',
'social.pipeline.social_auth.load_extra_data',
'social.pipeline.user.user_details',
'letrasclub.utils.create_profile'
)
其正常管道+ create_profile
,去年僅管道爲用戶創建一個配置文件,如果它沒有一個。它可能不是問題的根源,因爲管道正在創建新用戶,發生在'social.pipeline.user.create_user'
。
你的'SOCIAL_AUTH_PIPELINE'設置包含什麼? – Brandon
@Brandon,Thnx尋求答案。添加管道到問題。 – alejoss