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?
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.
Indeed @ArtemBernatskyy! One of the causes of the message: 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. is because of this issue.
I assume the facebook backend has all these parameters for legacy reasons? With the state parameter you should be able to track whatever you need...
I think the FacebookOAuth2 class needs STATE_PARAMETER = False.
that removes the state parameter from the redirect uri but it's still failing




Noticing the error message complain about App Domain I try adding localhost:8000 and localhost but get different errors for both.
Faced same problem. Did somebody solved it?
Any solution guys?
We're facing the same issue. Any luck @paltman ?
Not yet. I'm coming back to it today after some time away hoping to have found someone fixed it by now. :)
I think it's a url encoding issue
No, Facebook specifically disabled the ability to have url parameters other
than state.
On Sat, Mar 31, 2018, 12:02 PM Patrick Altman [email protected] wrote:
I think it's a url encoding issue
— 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-377707636, or mute the thread https://github.com/notifications/unsubscribe-auth/AAJ-H0Un9nsDC9k_GwPg6z6skZm2EM-wks5tj7aLgaJpZM4SvgCs .
-- Dustin
i'm only sending redirect_uri
Also, when I urlencode the contents of the redirect_uri, the redirect happens
I'm an idiot.
I was including extra params in my whitelisted url. Setting to just http://localhost:8000/account/social/complete/facebook/ work.
@paltman can you create pull request with fix for that ?
i was planning to be ended up with zero changes. i was just adding the wrong string for the redirect url
Sent from my iPhone
On Mar 31, 2018, at 3:59 PM, Artem.Bernatskyy [email protected] wrote:
@paltman can you create pull request with fix for that ?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
Following @paltman comment I just add "https://{my_domain}/complete/facebook/" to Valid OAuth Redirect URIs and it worked.
from social_core.backends.facebook import FacebookOAuth2
class CustomFacebookOauth(FacebookOAuth2):
REDIRECT_STATE = False
and in settings.py: change social_core.backends.facebook.FacebookOAuth2 on your CustomFacebookOauth in AUTHENTICATION_BACKENDS
White list must not contain query params. Just {domain}/auth/social/complete/facebook/ Helped for me.
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.
Can somebody post fully fledged tutorial how to fix that ? Thx