oauth-2.0google-api

Google Oauth2 redirect_uri_mismatch when send request from localhost


I use Google OAuth2 for my codeigniter application and i send request using the HybridIgniter.

REDIRECT URIS : http://localhost/college-rating-system/hauth/endpoint.

JAVASCRIPT ORIGINS : http://localhost

When send request from localhost then we get 400 error that is,

Error : redirect_uri_mismatch

Any idea ..?


Solution

  • Check the full error it will tell you the URL its coming from.

    The redirect URI must match exactly what you have placed in the Google developer console.