URL Blocked: This redirect failed because the redirect URI is not whitelisted…(Localhost web application)

ε祈祈猫儿з 提交于 2019-12-05 00:15:47

It's redirect URL problem. Facebook automatically generates a redirect URL which is http://...[your domain]..../signin-facebook. You need to add this URL to Client OAuth Settings along with your own redirect_URL like below:

Hope it helps

I faced this issue as well.
What I did: When you get this message, copy the URL from the browser window, and inspect it. The URL has the redirect URL mentioned within it.
Copy the exact redirect URL as mentioned, and put it under Valid OAuth Redirect URLs, it will solve the problem.

I've just had the issue (Nov 2017), after years of it working (but did I change something inadvertently?).

The fix was to add the callback url in the "Facebook Login" "Products" (in the left menu, in the Facebook admin console, NOT in the "Advanced settings" where I've tried everything:

https://developers.facebook.com/apps/{{your FB app id}}/fb-login/settings/

Note that you need to put the port number if you have one, e.g. in my case http://local.dishly.menu:3000/

I had an issue with this, specifically with heroku. My test site was not https. It was http. And by default, facebook likes to prepend a url with https if you don't manually type it in when typing in the url.

So, I added two urls. one with http, and one with https. works fine now \o/

Hocine Sahnoun

I had this issue because I was using Ajax to login and signup for my site, so I added this redirect url

https://yoursite.com/wp-admin/admin-ajax.php?action=gears_fb_connect&callback=true 

and it worked perfectly any user can sign in with his facebook account.

I'll post it here just in case it's useful to someone in the future because I got in this question looking for answer...

In my case I got this error while trying to integrate Facebook as an Identity provider in conjunction with Azure AD B2C custom policies.

Microsoft docs mentions a given URL in this format:

https://your-tenant-name.b2clogin.com/your-tenant-name.onmicrosoft.com/oauth2/authresp

however when clicking the Facebook login button it was redirecting with the tenant Id instead of the Tenant Name like this:

https://your-tenant-name.b2clogin.com/TENANTIDHERE/oauth2/authresp

This was causing the URL to be blocked by Facebook.

I discovered this by reading this answer right here.

If you need to decode the URL that it's redirecting to, you can use this:

https://www.urldecoder.org/
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!