Search code examples
oauth-2.0http-status-code-400google-developers-console

OAuth Error 400: invalid_request Missing scheme: /login


I am trying to use OAuth in my app and I am getting the following error after clicking the login button to be redirected to the generated url.

However, I am getting the following error but I'm pretty sure that I have my URI's configured correctly in the developers console (image below).

Also, I am not finding the same error while searching. Has anyone else encountered this?

enter image description here

I am pretty sure that I have the /login scheme configured correctly as so.

enter image description here

It's worth mentioning that I am following a tutorial series and this is exactly what they recommended. That's another reason I'm pretty confused.

Thanks for any help in advance.


Solution

  • I discovered the issue - I was passing an invalid URL into the options of google.auth.OAuth2( ... )

    I failed to realize this because my URL was coming from .env file.