aws-mobile-appsync-sdk-js icon indicating copy to clipboard operation
aws-mobile-appsync-sdk-js copied to clipboard

I can't setClockOffset for resolve 'Signature not yet current' - correctClockSkew

Open ktoala opened this issue 4 years ago • 1 comments
trafficstars

Do you want to request a feature or report a bug? Bug

What is the current behavior? when use AWSAppSyncClient with auth AWS_IAM I get the next error when execute query Signature not yet current: 20210205T063224Z is still later than 20210205T062625Z (20210205T062125Z + 5 min.)

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Change your clock manually by over 5 minutes in the past or future.

What is the expected behavior? In AWS Amplify for JS I can use the next code and the problem is resolved. Auth.currentAuthenticatedUser({bypassCache: true}) .then(user => DateUtils.setClockOffset(-(user.signInUserSession.clockDrift * 1000))) .catch(() => {}); But when use aws-mobile-appsync-sdk-js. It's doesn't work

Which versions and which environment (browser, react-native, nodejs) / OS are affected by this issue? Did this work in previous versions? browser, ionic + capacitor

I was review the code and I think the problem is here because I can't set clock offset like DateUtils.setClockOffset of AWS Amplify.

This issue has affected our customers and was a difficult issue to detect in production.

ktoala avatar Feb 05 '21 06:02 ktoala

@ktoala Any update on this by any chance??

danielvouch avatar Sep 02 '22 02:09 danielvouch