Search code examples
google-oauthfacebook-oauthhybridauth

hybridauth: redirect URI is not whitelisted in the app


i am configuring single sign on feature with hybridauth plugin. It took me 2 days setup this. However, i am getting redirect uri error with facebook and google. In google and facebook i have given website name like this http://example.com

i didn't found anywhere to put redirect url.

Now when i click on facebook or google. I am getting below 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.

Google error is below.

400. That’s an error.

Error: redirect_uri_mismatch

Login page exist on root and there is a folder i have created for hybridauth. Inside that folder index.php file.

In config.php file. i have given baseurl like this.

"base_url" => "http://example.com/hybridauth/index.php",

I know this question doesn't have much code. But as per me issue with base_url and facebook/google oauth api.


Solution

  • You should be able to set Authorized redirect URIs on the provider's page. For example, on Google's Developer Console, you should be able to set the Authorized redirect URIs on the Credentials tab for your app:

    enter image description here