How I Solved My Google OAuth2 Redirect URI Error That Was Hiding in Plain Sight 😒

So I happened to use OAuth2 by Google, but I was getting this error despite having the exact correct path—I copied it straight from my browser’s search bar.

But to my surprise, I was still getting the error. I was utterly confused. 😵‍💫


So this is what I tried:

  1. Checked the Network tab to see if anything was wrong. It looked good.
  2. Copied the exact address from the search bar into the origin and callback fields.
  3. What actually worked: I clicked on error detail 🤯

error detail image


Then came the twist...

I knew I had to check the error details here too. So I clicked it, and to my surprise:

Error message

Now, this was shocking. I saw the lock icon up there while copying, so I assumed it was https.

But in reality—it was actually http.

This is evil in plain sight, and honestly, this kind of thing shouldn't even happen. 😒


The fix that worked:

I added http (instead of https) to both the origin and the redirect URI.

Boom. Issue resolved.

So yeah—next time, take a close look at the error message and match everything properly.

Because if this happened in plain sight, anything can.

I had already tried all other possibilities and finally ended up solving it with this simple change.


😋 I didn’t include screenshots of the Network tab to avoid overwhelming you, but trust me—I went deep.

Headers, cookies, requests, responses, shared files—you name it.

But yeah, sometimes it's best to try the simple stuff first.

http added to


Moral of the story:

Don’t trust the lock icon. Trust your logs and error details. 👀


Oh computer