Skip to content

Feature Request: Clock Skew Correction #4174

@jamesleech

Description

@jamesleech

Description

Hi,

We've just run into a clock drift issue. When our users, mostly the international citizens, have their mobile devices clock set manually, to another datetime, we are seeing 403s from API Gateway.

"userAgent":"amplify-flutter/1.4.1 ios/17.1.1 API/23 aws-sigv4-dart/0.5.0","authorizorError":"The request for the IAM Authorizer doesn't match the format that API Gateway expects.

If you manually set the date time to a date time on the mobile device, this is repeatable, change it back to automatic, and the problem disappears.

We never saw this issue before migrating our app to flutter from react-native. Upon looking at the javascript lib, I've found;

https://github.com/aws-amplify/amplify-js/blob/8499b9438aa5ad88483bcd56ab32193496d140b5/packages/core/src/clients/middleware/signing/middleware.ts#L42

Is there a way to handle this in the flutter libs with Cognito userpools calling API gateway with IAM Auth?

Categories

  • Analytics
  • API (REST)
  • API (GraphQL)
  • Auth
  • Authenticator
  • DataStore
  • Notifications (Push)
  • Storage

Steps to Reproduce

No response

Screenshots

No response

Platforms

  • iOS
  • Android
  • Web
  • macOS
  • Windows
  • Linux

Flutter Version

">=3.0.0 <4.0.0"

Amplify Flutter Version

1.4.1

Deployment Method

Custom Pipeline

Schema

No response

Metadata

Metadata

Assignees

Labels

dartPull requests that update Dart codefeature-requestA request for a new feature or an enhancement to an existing API or category.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions