#'I've encountered a problem with the Netflix javascript library - one
that I've seen mirrored across a few posts in these forums...

-- How the problem occurs --

Assuming your OAuth server is up and running, everything is spot on,
the server time is correct, and it has a 5 minute threshold for
timestamps. As a client, set your system clock to be an hour later
than it should. The javascript library uses (quite rightly) the Date
object to get the time, but it uses the incorrect system time and will
result in an error from the OAuth server.

Now, this isn't something you can shrug off, it's not wise to expect
or demand that your users have the correct clock - there's  a
bajillion reasons it might be off.

-- Suggestion for a fix --

When you request the javascript file, append the server time to the
request like so:

<script type="text/javascript" src="/js/oauth.js?
servertime=1234567890"></script>

So, if you were running PHP, this would be the way to do it:

<script type="text/javascript" src="/js/oauth.js?servertime=<?=time ()?
>"></script>

When the oauth.js loads it should then compare the passed time to the
system time and note the offset so that the timestamp function can
adjust for any difference. I'm working on the fix for it now, should
be trivial to complete but would be good to know if the Netflix boys
would add it to the official files when I'm done

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

Reply via email to