Search code examples
google-oauth

Google OAuth2 Error: redirect_uri_mismatch


My client is use other type enter image description here

I have no idea why i get redirect_uri_mismatch error. It work on localhost but not on domain. enter image description here


Solution

  • Client type other is for installed applications it should not have a redirect uri the way it works is it returns the authorization code directly back where it came from that being

    • localhost
    • 127.0.0.1
    • urn:ietf:wg:oauth:2.0:oob

    For some reason your code is sending a https redirect uri which is in correct it should not be doing this. It looks like you are using the code for a web browser application with a native application client.