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

feat(liveness): expose systemClockOffset to override rekognition client config

Open esauerbo opened this issue 7 months ago • 1 comments

Description of changes

  • Exposes the systemClockOffset in the FaceLivenessDetectorCore config which will override the RekognitionStreamingClientConfig
  • Developers can optionally pass this into their config to support clockSkews greater than 5 minutes (what rekognition supports by default)

https://ui.docs.amplify.aws/react/connected-components/liveness/troubleshooting Screenshot 2024-06-28 at 12 00 26 PM

https://ui.docs.amplify.aws/react/connected-components/liveness/customization Screenshot 2024-06-28 at 11 58 38 AM

Issue #, if available

Fixes https://github.com/aws-amplify/amplify-ui/issues/5124

Description of how you validated changes

Smoke tested - changed system clock to be ahead, behind, and aligned with server time and ran through successful checks. Also ran through unsuccessful checks with connection/regular/session timeouts.

  1. Change clock on device to be ahead or behind of the actual time without changing time zone (on mac go to system settings, date & time, uncheck Set date and time automatically and then change the time)
  2. Verify you still get the Invalid Signature Exception by removing the systemClockOffset from the config in LivenessDefault (lines 68/69)
  3. Add systemClockOffset back
  4. Verify you can run through a successful check

Checklist

  • [x] Have read the Pull Request Guidelines
  • [x] PR description included
  • [x] yarn test passes and tests are updated/added
  • [x] PR title and commit messages follow conventional commit syntax
  • [x] If this change should result in a version bump, changeset added (This can be done after creating the PR.) This does not apply to changes made to docs, e2e, examples, or other private packages.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

esauerbo avatar Jun 26 '24 22:06 esauerbo