Google:拒绝为不在本地主机上的目标域生成登录提示的权限 [英] Google: Permission denied to generate login hint for target domain NOT on localhost

查看:169
本文介绍了Google:拒绝为不在本地主机上的目标域生成登录提示的权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试创建Google登录并收到错误消息:

I am trying to create a Google sign-in and getting the error:

拒绝为目标域生成登录提示的权限

在将其标记为重复项之前,这与

Before you mark this a duplicate, this is not the same as the question asked at Google sign in website Error : Permission denied to generate login hint for target domain because in that case the questioner was on localhost, whereas I am getting this error on the server.

具体来说,我已将服务器的URL包含在授权Javascript起源"中,如下图所示:

Specifically, I have included the url of the server in the Authorized Javascript Origins, as in the following image:

,当我收到错误消息时,请求显示发送了相同的URL,如下图所示:

and when I get the error, the request shows that the same url was sent, as in the following image:

我还应该在限制"页面中添加其他内容吗?有什么办法可以弄清楚这里发生了什么吗?开发者控制台上是否有日志可以告诉我发生了什么事?

Is there something else I should be putting in my Restrictions page? Is there any way to figure out what is going on here? Is there a log at the developer console that can tell me what is happening?

推荐答案

好的,我知道了.我使用的是重定向uri的IP地址(如" http://175.132.64.120 "),因为这是实时服务器,Google只接受实际的网址(如" http://mycompany.com "或"

Okay, I figured this out. I was using an IP address (as in "http://175.132.64.120") for the redirect uri, as this was a test site on the live server, and Google only accepts actual urls (as in "http://mycompany.com" or "http://localhost") as redirect uris.

您可能知道,它们可能在文档中的某些地方说了,但无论如何.

Which, you know, THEY COULD HAVE SAID SOMEWHERE IN THE DOCUMENTATION, but whatever.

这篇关于Google:拒绝为不在本地主机上的目标域生成登录提示的权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆