我正在使用python-social-auth对django项目进行身份验证.我正在localhost上运行django服务器并让facebook设置我的应用程序重定向到http://127.0.0.1:8000/complete/facebook/,它开始python-social-auth的管道来验证用户.我使用postgres作为我的数据库.
调用此方法并尝试进行身份验证时,无法找到有关会话的信息.从https://github.com/omab/python-social-auth/issues/534,我认为sessionid cookie正在被覆盖.如果我将facebook重定向发送到另一个网址以加载没有身份验证的静态页面,则没有错误,但我也没有验证或从Facebook获取任何信息.
我怎么会不覆盖sessionid cookie-当然,这是实际的问题 - 还是我可能在这里缺少另一个问题?
[03/Jun/2016 05:19:58] "GET /login/facebook/?next=/lithium-web/ HTTP/1.1" 302 0
Internal Server Error: /complete/facebook/
Traceback (most recent call last):
File "/Users/mac/Desktop/lithium-web/lib/python2.7/site-packages/django/core/handlers/base.py", line 149, in get_response
response = self.process_exception_by_middleware(e, request)
File "/Users/mac/Desktop/lithium-web/lib/python2.7/site-packages/django/core/handlers/base.py", line 147, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/Users/mac/Desktop/lithium-web/lib/python2.7/site-packages/django/views/decorators/cache.py", line 57, in _wrapped_view_func
response = view_func(request, *args, **kwargs)
File "/Users/mac/Desktop/lithium-web/lib/python2.7/site-packages/django/views/decorators/csrf.py", line 58, in wrapped_view
return view_func(*args, **kwargs)
File "/Users/mac/Desktop/lithium-web/lib/python2.7/site-packages/social/apps/django_app/utils.py", line 51, in wrapper
return func(request, backend, *args, **kwargs)
File …Run Code Online (Sandbox Code Playgroud) authentication django localhost session-cookies python-social-auth