Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

google OAuth consent screen scheme error: Invalid domain: must not specify the scheme. (http:// or https://)

I have been trying to use google OAuth service and got a terrible error, which doesnt seem to be just working at all. localhost:3000 doesnt work

nor does this work, nor does this work.

How to resolve this properly?

like image 628
SAP ASFlash Avatar asked May 20 '26 21:05

SAP ASFlash


2 Answers

The Authorized domain field does not accept the localhost addresses.

If you are trying to configure the OAuth2 for your test application you do not need to specify this domain detail for the OAuth consent screen, just skip this field.

Upon saving details for the authentication screen you will need to specify the Authorized redirect URIs in the Credentials menu - put your domain address there along with the appropriate endpoint and you will be good to go.

like image 163
BoomForm Avatar answered May 23 '26 05:05

BoomForm


For me I had to edit my /etc/hosts folder

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1             localhost
127.0.0.1 test.cc

then run instead of localhost:3000 dev locally on test.cc:3000. Of course test.cc is an arbitrary name you can put what ever you want.

Once this is done submit that domain as an authorized domain on your OAuth consent screen.

enter image description here

like image 33
Michael Nelles Avatar answered May 23 '26 07:05

Michael Nelles