4👍
Django 1.4.15, django-allauth 0.18.0, Facebook upgrade API v2.8
Since Mars 2018, Facebook sets “Use Strict Mode for Redirect URls” YES by default. My problem was in the Facebook App configuration, not in django-allauth.
Working again App settings:
Settings Basic
– App Domains: “AnySite.com”
– Privacy policy URL: “https://AnySite.com/myprivacy/“
– Website: “https://AnySite.com/“
Settings Advanced
– Server IP Whitelist: let it blank
– Domain Manager: let it blank
Facebook login Settings
Yes Client OAuth Login
Yes Web OAuth Login
Yes (new: forced) Use strict Mode for redicect URLs
Yes Embeded Browser OAuth Login
Yes Enforce HTTPS
Valid OAuth Redirect URLs: “https://AnySite.com/accounts/facebook/login/callback/” (mandatory)
Hope it helps.
1👍
Update in case anyone else is struggling with this in 2020:
In facebook developers:
- create a test app from your main app
- settings -> basic, add localhost and 127.0.0.1 to app domains. set site url to https://localhost:8000
- Products -> facebook login -> settings. client, wen login enabled. Embedded Browser OAuth Login enabled.
Add all of these into Valid OAuth Redirect URIs:
https://127.0.0.1:8000/
https://127.0.0.1:8000/accounts/facebook/login/callback
https://localhost:8000/
https://localhost:8000/accounts/facebook/login/callback
In django:
pip install django-sslserver
- add sslserver to INSTALLED_APPS
python manage.py runsslserver
In admin:
- Create 2 sites, https://127.0.0.1:8000/ and https://localhost:8000/
- Add a social application, facebook, add in your test app id and key. Register the 2 sites above into it.
- [Django]-NoReverseMatch error when creating new users through admin
- [Django]-How to make a geography field unique?