【问题标题】:Why Steam OpenID redirect me to error dgango view?为什么 Steam OpenID 将我重定向到错误 django 视图?
【发布时间】:2016-07-18 20:07:23
【问题描述】:
我正在使用 django、python social auth 和 Steam。
对于日志记录,我向 Steam 发送了获取请求({% url social: begin steam %}),
我得到了 Steam 日志记录页面。我传递了我的登录名和密码并按下登录。之后我被重定向到错误 url(而不是成功 url)。这意味着我只登录了 Steam,但没有登录我的网站。
那为什么会这样呢?
【问题讨论】:
标签:
python
django
openid
steam
python-social-auth
【解决方案1】:
我在 settings.py 中添加了这个变量,当我删除它们时,我的网站开始按预期工作。
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.social_auth.associate_user',
'social.pipeline.social_auth.load_extra_data',
'social.pipeline.user.user_details',
)
SOCIAL_AUTH_DISCONNECT_PIPELINE = (
# Verifies that the social association can be disconnected from the current
# user (ensure that the user login mechanism is not compromised by this
# disconnection).
'social.pipeline.disconnect.allowed_to_disconnect',
# Collects the social associations to disconnect.
'social.pipeline.disconnect.get_entries',
# Revoke any access_token when possible.
'social.pipeline.disconnect.revoke_tokens',
# Removes the social associations.
'social.pipeline.disconnect.disconnect',
)