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.
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