Google Authsub for a Google apps domain
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/fe开发者_开发问答eds/&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?
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.....
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 :)
精彩评论