I am using django framework with python-social-app and have an error while trying to login with Facebook login button.
My app consists of three docker containers:
- Django app.
- Database.
- NGINX + SSL cert.
Here is my error:
Authentication process canceled: URL Blocked: This redirect failed because the redirect URI is not whitelisted in the app’s Client OAuth Settings. Make sure Client and Web OAuth Login are on and add all your app domains as Valid OAuth Redirect URIs. Blockquote
and here is the URL that i can see while trying to login
The problem, as i can see it, is that redirect_uri starts with HTTP and not with HTTPS.
Django==2.2
social-auth-app-django==3.1.0
social-auth-core==3.1.0
My best guess about the problem is that Django app don't "know" that it's running behind the NGINX+SSL and generates the redirect_uri with HTTP protocol instead of HTTPS.
Facebook settings has correct redirect URI that starts with HTTPS. The problem is not specific to Facebook, redirect_uri for Google has the same problem.
How can I force the python-social to to use HTTPS?