amplify-ui
amplify-ui copied to clipboard
chore(liveness/nolight): pass in multiple challenges
Description of changes
-
Updates the sdk to the newer version which accepts multiple challenge types, and pass in multiple challenges in the StartFaceLivenessSession API call.
-
In the state machine, retrieves the selected challenge type from the websocket and event and adds it to the context. Add some utils related to this.
-
Update the
CustomWebSocketFetchHandler
to the later version included with the new sdk. (The current version of this handler on main is copied directly from the sdk; it was updated in the later version so re-copied it over.) -
Refactor
liveness.ts
to work with multiple challenge types.
*This code won't work on it's own. It sends + receives the challenge type, checks for the challenge type, and gets the session information and oval details, but will need the no-light state machine to prevent it from entering the light flashing stage (where it errors out currently).
Issue #, if available
Description of how you validated changes
Checklist
- [ ] Have read the Pull Request Guidelines
- [ ] PR description included
- [ ] Relevant documentation is changed or added (and PR referenced)
- [ ]
yarn test
passes and tests are updated/added - [ ] No side effects or
sideEffects
field updated
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
⚠️ No Changeset found
Latest commit: 3947b1b4f3bd0d85b23a3c0b9c30ee0dcdb204f7
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR