Google Apps 域的 Google Authsub
当我使用 Google Apps 的电子邮件服务时,我的主域名是在 Google Apps 中注册的。
我有一些网络工具,允许用户使用 Authsub 通过 Google Analytics 进行身份验证,然后在我的网站上生成报告。这些工具在我的其他域上运行良好,但如果我将它们托管在我的主域上,我将无法进行身份验证。
例如:
如果我使用以以下结尾的请求:&scope=https://www.google.com/analytics/feeds/&secure=0&session=1
然后错误如下:
无法显示您请求的页面。另一个网站正在请求访问您的 Google 帐户,但发送了格式错误的请求。请联系您收到此消息时尝试使用的网站,告知他们该错误。详细的错误消息如下:
网站“http://mydomain.com”尚未注册。
但是,如果我使用以以下结尾的请求:&scope=https://www.google.com/analytics/feeds/&secure=0&session=1&hd=mydomain.com
然后我会看到:
为了授权第三方服务访问您的帐户,您必须登录。
然后它会显示我的应用程序帐户的登录信息,这对用户来说毫无意义。
我想要的是它能够正常进行身份验证(例如,像在其他域上那样询问用户的 Google 分析 ID 和密码)。这可能吗?
My primary domain name is registered with Google Apps as I use their email services.
I have some web tools which allow users to authenticate themselves with Google Analytics using Authsub and then produce reports on my website. These tools work fine on my other domains, but if I host them on my primary domain, I can't get the authentication to work.
E.g.:
If I use a request ending in:&scope=https://www.google.com/analytics/feeds/&secure=0&session=1
then it errors as:
The page you have requested cannot be displayed. Another site was requesting access to your Google Account, but sent a malformed request. Please contact the site that you were trying to use when you received this message to inform them of the error. A detailed error message follows:
The site "http://mydomain.com" has not been registered.
However if I use a request ending in:&scope=https://www.google.com/analytics/feeds/&secure=0&session=1&hd=mydomain.com
then I'm presented with:
In order to authorize a third party service to access your account, you must sign in.
And then it shows the login for my apps account which will be meaningless for the user.
What I want is for it to authenticate normally (eg ask users for their Google analytics ID and password like it does on other domains.) Is this possible?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
你有一些 api 密钥。
您可以在旧主机上注册该 api 密钥,并在新主机上使用相同的密钥。
这可能会导致正常工作出现问题......
You have some api key for that.
You may register that api key with ur old host and using the same with the new host.
It may cause problem for working properly.....
最终设法解决了这个问题。这与传递的 URL 无关,因为“hd=default”是正确的。解决方法是修改 https://www.google.com/accounts/ManageDomains 所以它符合我的脚本:)
Managed to fix this in the end. It's nothing to do with the URL being passed, as 'hd=default' was correct. The fix was to amend the return URL in https://www.google.com/accounts/ManageDomains so it matched my script :)