In the GData JS API (up to the current version) there's an issue
involving AuthSub authentication. When the GData library is loaded
with a callback option, AuthSub doesn't complete, for example:
google.load('gdata', '2.0', {callback: function(){}});

The callback causes GData to load asynchronously. When loading
completes, the AuthSub token in the URL (when one is available) isn't
consumed. The end result is that invoking google.accounts.user.login()
starts AuthSub normally and redirects the user to the AuthSubJS
handler, but when it redirects back (with the token in the URL), the
token is never consumed and AuthSub doesn't complete.

You can reproduce this issue using the HTML at the end of this post.
The process is the following:
1. Click to load GData.
2. Click to login, and follow the directions.
3, When redirected back, click to load GData again.

In step 3, when GData loads it should consume the AuthSub token in the
URL to wrap up authentication, but it doesn't

Here's the HTML to reproduce this behavior (logo-small.png is in there
because AuthSub JS requires an image in the same domain as the page):

<html>
<head>
        <script type="text/javascript" src="http://www.google.com/jsapi";></
script>
</head>
<body>
    <img src="logo-small.png" />
    <script type="text/javascript">
        function loadGDataAsync() {
                google.load('gdata', '2.0', {"callback" : function() { alert
('Loaded'); }});
        }
        function logMeIn() {
            scope = "http://www.google.com/calendar/feeds/";;
            var token = google.accounts.user.login(scope);
        }
    </script>
    <input type="button" value="Load GData" onclick="loadGDataAsync
();" />
    <input type="button" value="Login" onclick="alert(logMeIn());" />
</body>
</html>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Data Protocol" group.
To post to this group, send email to google-help-dataapi@googlegroups.com
To unsubscribe from this group, send email to 
google-help-dataapi+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-help-dataapi?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to