Conversation
| onCaptured: (base64Image) => { | ||
| // Triggered when accept button is tapped | ||
| console.log('onCaptured'); | ||
| //onImageCaptureSuccess({image: base64Image}); | ||
| }, |
There was a problem hiding this comment.
This is currently not being called when I click the accept button.
- I'm seeing the
onDetection,onOpened, andonClosedcallbacks being called. - I'm getting a console error about a content security policy failure.
- That console error goes away when I comment out the lines that load the
opencvscript (incontext/acuant)
The mobile setup I use to see these console errors is here.
There was a problem hiding this comment.
There was a problem hiding this comment.
Could the content security policy error be the root cause? Could be worth trying to disable that temporarily to see if it behaves any different.
There was a problem hiding this comment.
Thanks! It's not immediately clear to me how to (safely) disable the content security policy. I'm working on that.
There was a problem hiding this comment.
(safely)
I wouldn't worry too much about being safe with it as long as it's just for testing locally.
You could probably gut some parts of config/initializers/content_security_policy.rb or the override_csp_to_allow_acuant in app/controllers/concerns/idv/acuant_concern.rb to test.
There was a problem hiding this comment.
Thanks! Those code pointers were really helpful. No more content security policy error (for testing).
Turned out not to be the problem, but I think I'm on the right track again. I'm also reassured by the callbacks working correctly in our tiny test app.
| const startSelfieCamera = () => { | ||
| window.AcuantPassiveLiveness = getActualAcuantPassiveLiveness(); | ||
| // This opens the native camera, but TODO callbacks | ||
| //window.AcuantPassiveLiveness.startManualCapture((image) => console.log('image', image)); |
There was a problem hiding this comment.
When uncommented this works fine, logs the image dataurl when you take a picture using the native camera.
|
This PR was useful in investigating what needs to happen and getting help. The work here is replaced by #9580 . |
🎫 Ticket
https://cm-jira.usa.gov/browse/LG-11377
🛠 Summary of changes
This is PR 3 of 3 that will meet the ACs of LG-11377
AcuantPassiveLivenessavailable in the FE (loading the script).#9553 (this PR) Add the selfie UI.See LG-11377 Add Selfie UI #9580This PR uses the Acuant SDK to capture a selfie on the document upload page in the docauth javascript app. All work in this PR is behind a featureflag. To see it locally set this in application.yml
doc_auth_selfie_capture: '{"enabled":true}'