| Issue 24: | GoldenGate Plugin: Authentication Error - AuthSub token invalid or not set. Login to Google Photos |
1 of 5
Next ›
|
| 1 person starred this issue and may be notified of changes. | Back to list |
i click link, login with google, it stores the authsub token ok, but message still stays every page load, even though i can still access the album through the media library. What version of the plugin are you using? 1.5 Please provide any additional information below. I even have my blog URL "registered" at google. i dont know why it keeps doing that. what things should i check? you want my phpinfo dump?
Oct 19, 2008
#1
gottalov...@gmail.com
Oct 20, 2008
Hmm when you registered your domain, what did you put down for "Target URL path prefix" on the manage domains page? https://www.google.com/accounts/ManageDomains This has to be a prefix of your blog address (you can set it to the bare domain if you want e.g. http://www.example.com) or it will cause problems.
Oct 20, 2008
target = http://blog.ideasinwood.net/wp-admin
Oct 20, 2008
Very odd. I suppose it does the same thing if you clear the AuthSub token in the settings page and try to re-authorize again? If so can you email me directly and send me an AuthSub token that it's using that fails the validity check but is still usable?
Oct 20, 2008
Yes it does the same thing when clearing, uninstalling the plugin, deleting all the plugin files, and re-installing. Im not to sure about givin you the authsub token. my remedy was to comment out everything in the function i mentioned above, and force a return true. the error goes away, and able to still use the plugin. Like I said, when i echoed the $resp variable it echo'd HTTP 401 Unauthorized.
Dec 8, 2008
i've got the same problem, and i'd tried everything from google and so on. The problem is always there.
Dec 10, 2008
I'm not sure how there is a token that is rejected by the AuthSubInfo call but still works with the API... can you share a token that has this behavior? (You can revoke it first in the 'authorized websites' section of your Google Account so it can no longer be used.) I might then be able to get the accounts people to figure out what is amiss.
Dec 10, 2008
This is what I did to make it work:
function goldengate_valid_authsub() {
$token = goldengate_get_authsub_token();
if($token) {
return true;
}
return false;
}
instead of:
function goldengate_valid_authsub() {
$token = goldengate_get_authsub_token();
if($token) {
try {
$useSslProxy = goldengate_get_option('goldengate_use_ssl_proxy', 0);
if($useSslProxy) {
$sslProxyHost = goldengate_get_option('goldengate_ssl_proxy_host', '');
$sslProxyPort = goldengate_get_option('goldengate_ssl_proxy_port', '');
$client = new Zend_Http_Client('https://www.example.com/', array(
'adapter' => 'Zend_Http_Client_Adapter_Proxy',
'proxy_host' => $sslProxyHost,
'proxy_port' => intval($sslProxyPort)
));
$resp = Zend_Gdata_AuthSub::getAuthSubTokenInfo($token, $client);
}
else {
$resp = Zend_Gdata_AuthSub::getAuthSubTokenInfo($token);
}
if(preg_match('/^Target=(.+)\nSecure=(.+)\nScope=(.+)/', $resp)) {
return true;
}
}
catch(Zend_Gdata_App_HttpException $e) {
goldengate_print_error("Problems checking token. Check proxy?");
}
return true;
}
return false;
}
There's something wrong with the function.
Dec 10, 2008
I just noticed, in this function you are calling Zend_HTTP_Client. How come you aren't loading the class at the top of the file llike you do with the Zend_GDATA classes?
Dec 20, 2008
I think that gets loaded implicitly when you load any of the service classes. I could check on that. It should error properly if it's not. Hmm I wonder what part of the info check is failing. Mostly I did it that way because I wanted a way to quickly check if the token worked after installing so I could pop out an obvious error. Maybe it would be better in the future to just handle the error on the browse/upload tabs instead. Though it would suck to upload a photo only to find out it wasn't ready.
Jul 1, 2009
I altered your code to change the default values of the insert options, no i get this issue about the authentication code, even tho the plugin works fine. I am using wp 2.8, but this is the only plugin that does exactly what i want! Andy
Jul 1, 2009
Can you snoop the HTTP request that it's making that is getting back the failed token? |