social-app-django: Can't Load URL with Strict Mode for Redirect URIs in FB

Facebook has default the Strict Mode for Redirect URIs, so now it’s impossible to login with an url like this one:

http://<domain>/social-auth/complete/facebook/?redirect_state=<token>

Is there a walk around to fix this issue?

Also try to set the Valid OAuth redirect URIs in the facebook developer dashboard in this mode:

http://<domain>/complete/facebook/&client_id=<client_id>&return_scopes=true,
http://<domain>/social-auth/complete/facebook/?redirect_state=<>

Proposal from here: https://github.com/python-social-auth/social-app-django/issues/112

But didn’t work!

Is there a correct way to set up the Valid OAuth redirect URIs?

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 6
  • Comments: 39

Most upvoted comments

Today my auth has stopped working, mmmm nice 😃

Is it related to this issue ?

Can't Load URL: The domain of this URL isn't included in the app's domains. To be able to load this URL, add all domains and subdomains of your app to the App Domains field in your app settings.

Any solution guys?

Update to the latest version, on your virtual env: pip install social-auth-app-django -U

Also add to Valid OAuth Redirect URIs: https://<domain_here>/oauth/complete/facebook/

Faced same problem. Did somebody solved it?

I’m an idiot.

I was including extra params in my whitelisted url. Setting to just http://localhost:8000/account/social/complete/facebook/ work.

Can somebody post fully fledged tutorial how to fix that ? Thx

@arthur55 You should have this:

social-auth-app-django==2.1.0
social-auth-core==1.7.0

@ArtemBernatskyy Nice to know it helped you.

Can anyone help me? The fb login url in mysite is: https://<my_domain>/oauth/login/facebook/ And I add this url in fb oauth redirect: https://<my_domain>/oauth/complete/facebook/

Then it returned: Can’t Load URL: The domain of this URL isn’t included in the app’s domains. To be able to load this URL, add all domains and subdomains of your app to the App Domains field in your app settings.

I am sure I’ve added <my_domain> in the App Domains field in fb console. This confuses my a lot, thank you guys.

Add this: Redirect = False In file facebook.py Google for more details

On Fri, Jun 15, 2018, 4:40 PM Amit Verma notifications@github.com wrote:

Hi everyone, I am still getting this error. I have latest version of social-auth-app-django.

I have provided “https://www.hiking-buddies.com/oauth/complete/facebook/” as redirect URIs.

Can someone please help?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/python-social-auth/social-app-django/issues/130#issuecomment-397569324, or mute the thread https://github.com/notifications/unsubscribe-auth/AkVKhxyMNKTTrNQqmnQv4HNKqAPFIRc7ks5t84D6gaJpZM4SvgCs .

I finally solved the problem! My pip and sudo pip point to different locations. Therefore, I used sudo env 'PATH=$PATH:<loaction>' pip to upgrade the version of social-auth-app-django, and then the fb api is working now! Thank you very much!

@arthur55 I think you use virtualenv so you have to activate the virtual environment where you run Django. For example $ workon env_name_here If you don’t know the name type workon and hit tab twice.

If you have messed up your packages run: $ sudo pip install social-auth-app-django -U

@tsaklidis awesome, now it works. As it turned out we also need to update social-auth-app-django ) @siddhusathi @arthur55 check this out

Use pip to update the social-auth-app-django

Select your app from developers console 1 Use the screenshot settings.

Not yet. I’m coming back to it today after some time away hoping to have found someone fixed it by now. 😃