How to fix redirect_uri_mismatch error with JavaScript


Have you been getting redirect uri mismatch error with JavaScript origins in your application. This is one of the most common authentication error messages you will get when you first start developing with the Google OAuth servers this error is caused by a setup issue. In this article I thought we would go through how to fix this issue.

When want use private data in your application you need to request user authorization in order to access it. This is done though Googles Authorization server, in order to use Google’s authorization server you need to register your application on Google developer console. In order for this to work there are some things that need to be configured and when you configure them incorrectly you will
get an error.

Redirect uri missmatch

In order to fix this error you need to go to Google developer console and configure the Javascript origin in your client.

I have a quick video which recreates the error using the Google Drive api and then shows you exactly how to fix it


About Linda Lawton

My name is Linda Lawton I have more than 20 years experience working as an application developer and a database expert. I have also been working with Google APIs since 2012 and I have been contributing to the Google .Net client library since 2013. In 2013 I became a a Google Developer Experts for Google Analytics.

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.