英文:
google OAuth consent screen scheme error: Invalid domain: must not specify the scheme. (http:// or https://)
问题
我一直在尝试使用Google OAuth服务,但遇到了一个严重的错误,似乎根本无法正常工作。
如何正确解决这个问题?
英文:
I have been trying to use google OAuth service and got a terrible error, which doesnt seem to be just working at all.
How to resolve this properly?
答案1
得分: 3
授权域字段不接受本地主机地址。
如果您正在尝试为测试应用程序配置OAuth2,您无需在OAuth同意屏幕中指定此域详细信息,只需跳过此字段。
在保存身份验证屏幕的详细信息后,您需要在凭据菜单中指定已授权的重定向URI - 将您的域地址与相应的端点一起放在那里,然后您就可以继续进行了。
英文:
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.
答案2
得分: 1
我需要编辑我的/etc/hosts文件:
##
# 主机数据库
#
# 当系统启动时,localhost用于配置回环接口。不要更改此条目。
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
127.0.0.1 test.cc
然后在本地以test.cc:3000
而不是localhost:3000
运行开发服务器。当然,test.cc
是一个任意的名称,您可以使用任何您喜欢的名称。
完成后,请将该域名提交为您的OAuth同意屏幕上的授权域。
英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论