i am getting this problem URL Blocked: This redirect failed because the redirect URI is not whitelisted in the app’s Client OAuth Settings. Make sure Client and Web OAuth Login are on and add all your app domains as Valid OAuth Redirect URIs.
any solution?

Dani AI

Generated

That error means the URL your app sends in the OAuth request as the redirect_uri does not exactly match any entry in Facebook Login > Settings > Valid OAuth Redirect URIs. Facebook does a strict, character-for-character match, including scheme (http/https), subdomain (www vs non-www), path, trailing slash, port, and any static query string.

Quick way to fix:

  • In your browser devtools, click your Facebook login button and inspect the request to https://www.facebook.com/.../dialog/oauth. Copy the exact redirect_uri parameter value being sent.
  • In the Facebook Developer dashboard, open your app, go to Products > Facebook Login > Settings, and paste that exact URL into Valid OAuth Redirect URIs. Add every variant your plugin might use (e.g., with or without trailing slash, or a plugin-specific callback path).
  • Ensure Settings > Basic > App Domains includes your site domain, and that your callback endpoint does not 301/302 to a different URL (canonical redirects from non-www to www, or http to https, can trigger this error).
  • If the plugin lets you configure its callback URL, set it explicitly and keep it stable. When in doubt, set the redirect_uri yourself to the callback you whitelisted.

Note for end users (e.g., wormax.io): this must be fixed by the site owner; you cannot resolve it client-side.

Reference: Facebook docs on building the login flow (developers.facebook.com/docs/facebook-login/manually-build-a-login-flow) and redirect URI requirements (developers.facebook.com/docs/facebook-login/security#redirect-uri).

Recommended Answers

All 5 Replies

You're attempting to go through the OAuth flow (Facebook login, Google+ login, etc.) from a website that has not been authorized. How did you end up at this link? What were you trying to do?

i want my users to be able to login through their facebook account. What you mean is not authorised Dani? I mean i made a facebook app with a login oauth

Client OAuth Login is set to Yes.

Web OAuth Login is set to Yes

Force Web OAuth Reauthentication is set to No

Embedded Browser OAuth Login is set to No

Valid OAuth redirect URIs


You need to edit your OAuth settings on the Facebook website to specify the domain and URLs that will be used for the redirect_uri in the OAuth flow.

Did you create the OAuth flow yourself or are you using some type of existing plugin?

i used an existing plugin. But isn't https://www.myproject.com/facebook_login.php
the right redirect URI? I mean thats what the url says when a user press the facebook login icon on my website

Not able to play wormax.io using facebook registeration

I keep getting an error

URL Blocked: This redirect failed because the redirect URI is not whitelisted in the app’s Client OAuth Settings. Make sure Client and Web OAuth Login are on and add all your app domains as Valid OAuth Redirect URIs.

Is it something i should do, so long it was working well.

Regards
George

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.