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

[FR] Liveness: Support clock skew greater than 5 minutes

Open esauerbo opened this issue 10 months ago • 4 comments

On which framework/platform would you like to see this feature implemented?

React

Which UI component is this feature-request for?

Liveness

Please describe your feature-request in detail.

Users in some countries such as Brazil and Egypt use Android phones which have not been updated to the correct time zone, and thus are off by one hour. This results in a failed check with the below error

{
state: SERVER_ERROR
error: { "Message": Signature Expired ... }
}

We currently only support clock skew under 5 minutes, so the request is to support more than 5 minutes. https://github.com/aws-amplify/amplify-ui/issues/4386#issuecomment-1877775920

Please describe a solution you'd like.

No response

We love contributors! Is this something you'd be interested in working on?

  • [ ] 👋 I may be able to implement this feature request.
  • [ ] ⚠️ This feature might incur a breaking change.

esauerbo avatar Apr 02 '24 16:04 esauerbo

👍🏾 We are facing the same issue in BR, people from Amazonas (GMT -4), Acre (GMT -5), and other states that are not GMT -3, using phones that don't register correctly timezones cannot use liveness.

marcosconceicao avatar Jun 08 '24 12:06 marcosconceicao

@marcosconceicao We are researching this issues and have some questions. Can you give an example of how the devices with issues are set? From our testing it seems like users will encounter this issue when they have manually changed their clocks to a different time without changing the time zone, or we've also found that this can happen on older android devices which are still showing daylight savings time in Brazil time zones. Is this the scenario you are facing? Any further details you can provide would be very helpful.

reesscot avatar Jun 18 '24 17:06 reesscot

Hi team. Do we have any update on this issue?

anahiforesi avatar Jun 24 '24 21:06 anahiforesi

@anahiforesi This is something we're actively working on but I can't give a specific timeline for release at the moment.

esauerbo avatar Jun 25 '24 17:06 esauerbo

A fix for this has been released in @aws-amplify/ui-react-liveness@latest!

You can now optionally pass a value for systemClockOffset into the FaceLivenessDetectorCore config, where it will be added as an offset to the AWS server time. (e.g. if the device is one hour ahead of server time, you would pas -3600000, which is 1 hour in milliseconds)

<FaceLivenessDetectorCore
  ...
  config={{
    systemClockOffset={createLivenessApiData.systemClockOffset}
  }}
/>

You as the developer are responsible for calculating this value and you can find an example in our documentation. You can test your implementation locally by changing your device time while keeping the time zone the same.

If you have any questions, please open a new GitHub issue.

esauerbo avatar Jul 02 '24 23:07 esauerbo