amazon-archives / amazon-cognito-js

Amazon Cognito Sync Manager for JavaScript
http://aws.amazon.com/cognito
Apache License 2.0
202 stars 83 forks source link

reducing system time by 10 mins causes ListDataset call to fail #29

Closed skkiran-pro closed 7 years ago

skkiran-pro commented 8 years ago

ListDataset call is failing with following error when machine time is reduced by 10 mins:

{"message":"Signature expired: 20160615T060713Z is now earlier than 20160615T061234Z (20160615T061734Z - 5 min.)"}

our server will get the token using "get_open_id_token_for_developer_identity" (in ruby). from error we can infer that ListDataset call is actually comparing server time at which the token was created with the client time at which the ListDataset was called.

we are using "AWS SDK for JavaScript v2.0.27" and cognito-sync-js latest from https://github.com/aws/amazon-cognito-js.

how can we get around this OR will amazon fix it?

bendenoz commented 7 years ago

same issue with aws-sdk@2.6.1

bendenoz commented 7 years ago

Update, you should be able to use this as a workaround : AWS.config.correctClockSkew = true; (correctClockSkew)