Hello, I'm writing a javascript app that makes use of authenticated calls to Google Data. I'm using [AuthSub for Javascript][1], and having problems processing the login after granting access from Google.
The problem is, after redirecting back to my app, google.accounts.user.checkLogin() still returns false. There appears to be a timing issue: I'm performing the google.accounts.user.checkLogin() check from within an onLoad handler, triggered from the Google JS API [autoload][2] (although I have also tried using the traditional [google.load method][3]) If instead, I delay the check for a number of seconds using setTimeout, I see some network activity, and then the login is processed and google.accounts.user.checkLogin() returns true. Is there a callback/event handling system I should be using instead? I'd really rather not simply wait for a few seconds, as the delay will be contingent on the user's network connection, and it's horrible. There seems to be a [discussion thread][4] from July 2009 that somewhat covers the issue I'm seeing, but aside from adding "google.gdata.onLoad()" to the load event handler - which doesn't help - I don't see any resolution. Cheers, Michael [1]: http://code.google.com/apis/gdata/docs/js-authsub.html [2]: http://code.google.com/apis/ajax/documentation/#AutoLoading [3]: http://code.google.com/apis/ajax/documentation/#GoogleLoad [4]: http://groups.google.com/group/google-ajax-search-api/browse_thread/thread/c58d608672424837/961cc6317abab90a?lnk=gst&q=authsub#961cc6317abab90a -- You received this message because you are subscribed to the Google Groups "Google AJAX APIs" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-ajax-search-api?hl=en.
