因此,我正在使用 python-social-auth 应用程序允许用户在我的网站上使用 Google 的 Facebook (OAuth2) 登录,并且我的登录和身份验证部分正在工作。问题是当我尝试调用断开连接时。
http://psa.matiasaguirre.net/docs/configuration/settings.html#account-disconnection
它指定的只是使用 POST 请求和 CSRF 保护来调用它,但我一直收到错误消息:
TypeError at /disconnect/facebook/
get_social_auth_for_user() takes exactly 2 arguments (4 given)
Traceback:
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" get_response
115. response = callback(request, *callback_args, **callback_kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/contrib/auth/decorators.py" in _wrapped_view
25. return view_func(request, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/social/apps/django_app/utils.py" in wrapper
32. return func(request, backend, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/views/decorators/http.py" in inner
41. return func(request, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py" in _wrapped_view
91. response = view_func(request, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/social/apps/django_app/views.py" in disconnect
35. redirect_name=REDIRECT_FIELD_NAME)
File "/usr/local/lib/python2.7/dist-packages/social/actions.py" in do_disconnect
99. strategy.disconnect(user=user, association_id=association_id)
File "/usr/local/lib/python2.7/dist-packages/social/strategies/base.py" in disconnect
83. association_id)
跟踪堆栈跟踪没有帮助。当我尝试断开 Google 的连接时也会发生这种情况