简体   繁体   English

Facebook OAuth登录停止工作

[英]Facebook OAuth Login stopped working

In my website I use oauth for login via google, twitter and facebook. 在我的网站上,我使用oauth通过谷歌,Twitter和Facebook登录。 Since 24 hours I noticed that the facebook login does not work anymore. 从24小时开始,我注意到facebook登录不再起作用了。 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. 我不使用https而是使用http。

Can anybody please shed some light on this new situation? 有人可以对这种新情况有所了解吗? Thanks. 谢谢。

Just ran into this as well. 刚刚碰到这个。 Looks like Facebook started enforcing strict mode for redirect URIs this month. 看起来Facebook本月开始对重定向URI实施严格模式。 Resolution is to enter in your auth callback URL in the "Valid OAuth redirect URIs" field. 解决方法是在“有效OAuth重定向URI”字段中输入您的身份验证回调网址。

Look at Step 3 at this site: https://auth0.com/docs/connections/social/facebook 请查看此站点的第3步: https//auth0.com/docs/connections/social/facebook

Double check your "Valid OAuth redirect URIs". 仔细检查“有效的OAuth重定向URI”。 All of URLs must be set where exact as you use it (with GET params)! 所有URL必须在使用时精确设置(使用GET参数)!

For example, if you redirect URL is http://somesite.com/auth?type=facebook you cannot set just http://somesite.com/auth from now. 例如,如果您重定向网址是http://somesite.com/auth?type=facebook ,那么您现在无法设置http://somesite.com/auth

TIP: You can find this URL as a param in page address where you see an error message. 提示:您可以在页面地址中找到此URL作为参数,您会看到错误消息。

In march 2018, facebook change Oauth url, https://developers.facebook.com/blog/post/2017/12/18/strict-uri-matching/ . 在2018年3月,facebook改变了Oauth网址, https://developers.facebook.com/blog/post/2017/12/18/strict-uri-matching/ I use Hwioauth bundle, just solved the problem. 我使用Hwioauth捆绑,刚刚解决了问题。 Make sure you add all Valid OAuth redirect URIs. 确保添加所有有效OAuth重定向URI。 In my app has http://localhost:8000/ 在我的应用程序中有http:// localhost:8000 /

http://localhost:8000/connect/check-facebook HTTP://本地主机:8000 /连接/签的Facebook

http://localhost:8000/connect/facebook HTTP://本地主机:8000 /连接/ Facebook的

I got the same problem with the same symptoms where the callback URL on logon pop-up with some weird app_id. 我遇到了同样的问题,其中登录时的回调URL弹出一些奇怪的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. 最后,经过大量的搜索(罕见的情况),我发现了由Manychat Script和FB登录按钮之间的冲突造成的。 (the weird app_id on pop-up comes from Many Chat). (弹出的奇怪的app_id来自很多聊天)。

It's just a tips for your search, I'm not sure our problem caused from the same issue. 这只是一个搜索提示,我不确定我们的问题是由同一问题引起的。

Hope that help. 希望有所帮助。 Bryan 布赖恩

Make sure have entered the key hashes 确保已输入键哈希值

Steps : 脚步 :

https://developers.facebook.com/apps https://developers.facebook.com/apps

1.Basic 1.基本

2.Add Platform(android,ios) 2.添加平台(android,ios)

3.fill the details and make sure you entered correct Key Hashes. 3.填写详细信息并确保输入正确的Key Hashes。

Give it a try !! 试试看 !!

if you using sdk facebook php, please make into method "getAccessToken()" the "redirect uri" valid, example: 如果你使用sdk facebook php,请将方法“getAccessToken()”改为“redirect uri”,例如:

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

where re-OAuth.php is is a return script.- (for example) 其中re-OAuth.php是一个返回脚本.-(例如)

This will solve the problem .. greetings.- 这将解决问题..问候.-

Sorry for my bad english 对不起,我的英语不好

正如Konstantin Bogdanov在上面的一个答案中所说,我通过添加为有效的OAuth重定向URI http://mydomain......com/login-base-url.php?hauth_done = Facebook解决了这个问题。

@Konstantin Bogdanov is right. @Konstantin Bogdanov是对的。 In addition, if you have dynamic query parameters in your redirect uri, those should go in the state parameter of the authorization request. 此外,如果您在重定向uri中有动态查询参数,那么这些参数应该放在授权请求的state参数中。

For details on this check my answer on a similar question. 有关此细节检查我的答案上类似的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM