amplify-flutter icon indicating copy to clipboard operation
amplify-flutter copied to clipboard

Feature Request: Signing on devices not using NTP

Open jamesleech opened this issue 2 years ago • 1 comments

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
  • [X] API (REST)
  • [ ] API (GraphQL)
  • [X] Auth
  • [ ] Authenticator
  • [ ] DataStore
  • [ ] Notifications (Push)
  • [ ] Storage

Steps to Reproduce

No response

Screenshots

No response

Platforms

  • [X] iOS
  • [X] 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

jamesleech avatar Nov 27 '23 06:11 jamesleech

Hey @jamesleech, Thanks for bringing this to our attention. We're investigating a solution. I will provide an update when I can.

Equartey avatar Dec 14 '23 19:12 Equartey