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 ..?
This error typically means the Client Redirect URL was not properly added to the OAuth Web Application in the Google Cloud Console. To resolve this, the user will need to copy the Client Redirect URL from the Single Sign-On Settings page from ThinkCentral, my.hrw.com, or HMH Ed.
The redirect URIs are the endpoints to which the OAuth 2.0 server can send responses. These endpoints must adhere to Google's validation rules. For testing, you can specify URIs that refer to the local machine, such as http://localhost:8080 .
The redirect URL is the endpoint for your application or web page that processes the seller authorization response and manages the seller's OAuth tokens. You need to add this URL to your application using the Developer Dashboard.
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.
Redirect URIs
http://localhost:8000/ this / at end solve my problem JavaScript origins
http://localhost:8000
NOTE: localhost and 127.0.0.1 conflicts can create problems for you sometime
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With