5

In my website I use oauth for login via google, twitter and facebook. Since 24 hours I noticed that the facebook login does not work anymore. I get the following error message when I try to log in:

"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 not using https but http.

Can anybody please shed some light on this new situation? Thanks.

Liliana Amen
  • 59
  • 1
  • 2

8 Answers8

3

Just ran into this as well. Looks like Facebook started enforcing strict mode for redirect URIs this month. Resolution is to enter in your auth callback URL in the "Valid OAuth redirect URIs" field.

Look at Step 3 at this site: https://auth0.com/docs/connections/social/facebook

pkim
  • 31
  • 3
1

Double check your "Valid OAuth redirect URIs". All of URLs must be set where exact as you use it (with GET params)!

For example, if you redirect URL is http://somesite.com/auth?type=facebook you cannot set just http://somesite.com/auth from now.

TIP: You can find this URL as a param in page address where you see an error message.

  • Hi Konstantin, the param in the page address is: login-base-url.php?hauth_done=Facebook&scope=email,user_about_me,user_birthday,user_hometown,user_location,user_website,publish_actions,read_custom_friendlists where login-base-url.php is Still even if I put this in the Valid OAuth redirect URIs NO GO! – Liliana Amen Mar 19 '18 at 11:02
  • I think I tried all kind or URIs and nothing seems to work. I am not sure it will ever work unless I move from http to https (which I am not sure how to do!) And correction of the message I wrote before: the param of the error page is http://mydomainxxxx.com/login-base-url.php...........NOT WORKING FOR ME! – Liliana Amen Mar 19 '18 at 17:36
  • Thank you Konstantin. I finally solved the problem by adding in the Valid OAuth redirect URI the http://mydomainXXX.com/login-base-url.php?hauth_done=Facebook . The Uri is taken indeed from the param of the URL of the page that gives the error message - but without the &scope=email....... – Liliana Amen Mar 20 '18 at 07:29
  • Hey @LilianaAmen can u please describe a bit? from where should I take the URI .. I have taken it from the url which shows on the error page during login from param *redirect_uri* and added it to the "Valid OAuth URI" section ..but still not working can you please help? – Naitik Shah Apr 24 '18 at 09:12
1

In march 2018, facebook change Oauth url, https://developers.facebook.com/blog/post/2017/12/18/strict-uri-matching/. I use Hwioauth bundle, just solved the problem. Make sure you add all Valid OAuth redirect URIs. In my app has http://localhost:8000/

http://localhost:8000/connect/check-facebook

http://localhost:8000/connect/facebook

chinhnguyen
  • 73
  • 1
  • 16
1

I got the same problem with the same symptoms where the callback URL on logon pop-up with some weird app_id.

Finally, after a lot of search (rare case), I found that which caused by the conflict between Manychat Script and FB login button. (the weird app_id on pop-up comes from Many Chat).

It's just a tips for your search, I'm not sure our problem caused from the same issue.

Hope that help. Bryan

0

Make sure have entered the key hashes

Steps :

https://developers.facebook.com/apps

1.Basic

2.Add Platform(android,ios)

3.fill the details and make sure you entered correct Key Hashes.

Give it a try !!

Aman Sharma
  • 11
  • 1
  • 2
0

if you using sdk facebook php, please make into method "getAccessToken()" the "redirect uri" valid, example:

<?php
...
$helper->getAccessToken('https://your-site.com/re-OAuth.php');
...
?>

where re-OAuth.php is is a return script.- (for example)

This will solve the problem .. greetings.-

Sorry for my bad english

0

As Konstantin Bogdanov said in one of the answers above I solved this problem by adding as Valid OAuth Redirect URI http://mydomain......com/login-base-url.php?hauth_done=Facebook .

Liliana Amen
  • 59
  • 1
  • 2
0

@Konstantin Bogdanov is right. In addition, if you have dynamic query parameters in your redirect uri, those should go in the state parameter of the authorization request.

For details on this check my answer on a similar question.

chess4ever
  • 134
  • 11