How to fix 'Social Network Login Failure' error of django-allauth deployed on Elastic Beanstalk

喜你入骨 提交于 2019-12-10 12:11:56

问题


I'm using django-allauth plugin to provide Facebook login in my application. The login works perfectly on my machine (localhost:8000) but it gives me this error when I try to login in the online version, deployed on Elastic Beanstalk (AWS):

Social Network Login Failure An error occurred while attempting to login via your social network account.

I've tried to debug it to get more information following this instructions: Debugging django-allauth Social Network Login Failure, but it gives no useful infromation:

{'provider': 'facebook', 'code': 'unknown', 'exception': None}

For the plugin configuration I've followed the guidelines provided by the documentation. And I think that everything is correctly configured in the FB app settings (app domain, site url, etc.)

A strange thing is that even though the app is configured to work with the online version (set app domain to my real domain and not localhost) it gives me this error when I try the log in from the online version, but it works correctly when I try it from localhost, without changing the FB app settings.


回答1:


Been there, use aws cognito for social sign in.

Here are the steps https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-social-idp.html

------------- or -------------------

you can python-social-auth (https://python-social-auth.readthedocs.io/en/latest/), just managed to configure using it. now i can login via facebook and google to my eb app



来源:https://stackoverflow.com/questions/55669538/how-to-fix-social-network-login-failure-error-of-django-allauth-deployed-on-el

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!