I'm using django-allauth for Facebook authentication in developement for a site and have set up accordingly:
within the facebook app settings on facebok:
Namespace: test_login
App Domains: blank
Site URL: http://127.0.0.1:8000/
Canvas URL: http://127.0.0.1:8000/
Secure Canvas URL: https://127.0.0.1:8000/
in Django admin I created new Social app:
Provider: Facebook
name: test_login
client_id: xxx
Secret: xxx
Sites: http://127.0.0.1:8000/
as you can see I added a new site http://127.0.0.1:8000/
instead of example.com
.
The SITE_ID in the settings.py is the correct one.
So everything should be working, but it's not. After clicking to login through Facebook I get
Given URL is not allowed by the Application configuration.:
One or more of the given URLs is not allowed by the App's settings.
It must match the Website URL or Canvas URL, or the domain must be a
subdomain of one of the App's domains.
What am I missing? What isn't configured? As far as I can understand I should be able to use 127.0.0.1:8000
for testing.
It worked for me setting the url in Facebook as localhost
instead of 127.0.0.1. Also pass localhost:8000
to ./manage.py runserver
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With