Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
b3db4fc
Removing initial selfie related react code
Oct 7, 2022
a603b3c
Culling more tests and references to selfie on frontend
Oct 7, 2022
8b59f1f
More cleanup
Oct 7, 2022
14b6cf7
Remove liveness enabled block
kbighorse Oct 14, 2022
50ff5e4
Remove unused variables
kbighorse Oct 14, 2022
5ba0431
Remove more unused variables
kbighorse Oct 14, 2022
f8741e6
Remove skipped test and unused variables
kbighorse Oct 14, 2022
08911af
Remove unhandled submission failure test
kbighorse Oct 14, 2022
a2e56fd
Remove handled submission failure test
kbighorse Oct 14, 2022
6f7093c
Remove async upload pending progress test
kbighorse Oct 14, 2022
b92d896
Remove onStepChange callback test
kbighorse Oct 14, 2022
d5181c3
Delete use-focus-fallback-ref.js
kbighorse Oct 14, 2022
724a866
Delete use-focus-fallback-ref-spec.jsx
kbighorse Oct 14, 2022
f1096fa
Remove liveness checking enabled context
kbighorse Oct 14, 2022
d3210bb
Merge branch 'main' into eric-lg-7710-remove-react-selfie
kbighorse Oct 14, 2022
5a8ab2c
Remove unused translations
kbighorse Oct 14, 2022
8d6d63b
Remove capture prop
kbighorse Oct 14, 2022
6863c1d
Remove selfie-related code
kbighorse Oct 14, 2022
352972f
Remove capture prop from file input component
kbighorse Oct 14, 2022
e135c3c
Remove capture prop pass
kbighorse Oct 14, 2022
64a1d79
Remove unnecessary assignment
kbighorse Oct 14, 2022
af5a309
Remove capture prop and unnecessary test
kbighorse Oct 14, 2022
76a7cb3
Merge branch 'main' into eric-lg-7710-remove-react-selfie
kbighorse Oct 24, 2022
796a81a
Merge branch 'main' into eric-lg-7710-remove-react-selfie
kbighorse Oct 25, 2022
c688258
Merge branch 'main' into eric-lg-7710-remove-react-selfie
kbighorse Oct 25, 2022
707e15b
Restore document capture tests
kbighorse Oct 25, 2022
d177b08
@aduth changes
kbighorse Oct 26, 2022
01fbddc
Remove unused import
kbighorse Oct 26, 2022
296f7f0
Merge branch 'main' into eric-lg-7710-remove-react-selfie
kbighorse Oct 26, 2022
b636370
Merge branch 'main' into eric-lg-7710-remove-react-selfie
kbighorse Oct 26, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -420,8 +420,6 @@ function AcuantCapture(
if (event.target === inputRef.current) {
const isAcuantCaptureCapable = hasCapture && !acuantFailureCookie;
const isEnvironmentCapture = capture !== 'user';
const shouldStartSelfieCapture =
isAcuantLoaded && capture === 'user' && !isForceUploading.current;
Comment thread
kbighorse marked this conversation as resolved.
let shouldStartAcuantCapture =
isAcuantCaptureCapable &&
capture !== 'user' &&
Expand All @@ -443,18 +441,11 @@ function AcuantCapture(
shouldStartAcuantCapture = !nativeCameraOnly;
}

if (!allowUpload || shouldStartSelfieCapture || shouldStartAcuantCapture) {
if (!allowUpload || shouldStartAcuantCapture) {
event.preventDefault();
}

if (shouldStartSelfieCapture) {
window.AcuantPassiveLiveness.startSelfieCapture(
ifStillMounted((nextImageData) => {
const dataURI = `data:image/jpeg;base64,${nextImageData}`;
onChangeAndResetError(dataURI);
}),
);
} else if (shouldStartAcuantCapture && !isAcuantInstanceActive) {
if (shouldStartAcuantCapture && !isAcuantInstanceActive) {
setIsCapturingEnvironment(true);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ describe('DocumentCaptureTroubleshootingOptions', () => {
const serviceProviderContext: ServiceProviderContext = {
name: 'Example SP',
failureToProofURL: 'http://example.test/url/to/failure-to-proof',
isLivenessRequired: false,
Comment thread
kbighorse marked this conversation as resolved.
getFailureToProofURL: () => '',
};
const wrappers: Record<string, ComponentType> = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { useDidUpdateEffect } from '@18f/identity-react-hooks';
import type { FormStep } from '@18f/identity-form-steps';
import { UploadFormEntriesError } from '../services/upload';
import DocumentsStep from './documents-step';
import SelfieStep from './selfie-step';
import InPersonPrepareStep from './in-person-prepare-step';
import InPersonLocationStep from './in-person-location-step';
import InPersonSwitchBackStep from './in-person-switch-back-step';
Expand Down Expand Up @@ -81,7 +80,7 @@ function DocumentCapture({ isAsyncForm = false, onStepChange = () => {} }: Docum
const submissionFormValues = useMemo(
() =>
formValues && {
...(isAsyncForm ? except(formValues, 'front', 'back', 'selfie') : formValues),
...(isAsyncForm ? except(formValues, 'front', 'back') : formValues),
flow_path: flowPath,
},
[isAsyncForm, formValues, flowPath],
Expand Down Expand Up @@ -146,10 +145,6 @@ function DocumentCapture({ isAsyncForm = false, onStepChange = () => {} }: Docum
name: 'documents',
form: DocumentsStep,
},
serviceProvider.isLivenessRequired && {
name: 'selfie',
form: SelfieStep,
},
].filter(Boolean) as FormStep[]);

const stepIndicatorPath =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import type { FormStepComponentProps } from '@18f/identity-form-steps';
import DeviceContext from '../context/device';
import DocumentSideAcuantCapture from './document-side-acuant-capture';
import AcuantCapture from './acuant-capture';
import SelfieCapture from './selfie-capture';
import ServiceProviderContext from '../context/service-provider';
import withBackgroundEncryptedUpload from '../higher-order/with-background-encrypted-upload';
import type { PII } from '../services/upload';
Expand All @@ -32,11 +31,6 @@ interface ReviewIssuesStepValue {
*/
back: Blob | string | null | undefined;

/**
* Back image value.
*/
selfie: Blob | string | null | undefined;

/**
* Front image metadata.
*/
Expand Down Expand Up @@ -81,7 +75,6 @@ function ReviewIssuesStep({
const { isMobile } = useContext(DeviceContext);
const serviceProvider = useContext(ServiceProviderContext);
const { trackEvent } = useContext(AnalyticsContext);
const selfieError = errors.find(({ field }) => field === 'selfie')?.error;
const [hasDismissed, setHasDismissed] = useState(remainingAttempts === Infinity);
const { onPageTransition, changeStepCanComplete } = useContext(FormStepsContext);
useDidUpdateEffect(onPageTransition, [hasDismissed]);
Expand Down Expand Up @@ -122,7 +115,7 @@ function ReviewIssuesStep({
>
{!!unknownFieldErrors &&
unknownFieldErrors
.filter((error) => !['front', 'back', 'selfie'].includes(error.field!))
.filter((error) => !['front', 'back'].includes(error.field!))
.map(({ error }) => <p key={error.message}>{error.message}</p>)}

{remainingAttempts <= DISPLAY_ATTEMPTS && (
Expand Down Expand Up @@ -166,45 +159,7 @@ function ReviewIssuesStep({
className="document-capture-review-issues-step__input"
/>
))}
{serviceProvider.isLivenessRequired && (
<>
<hr className="margin-y-4" />
<p className="margin-bottom-0">{t('doc_auth.tips.review_issues_selfie_header_text')}</p>
<ul>
<li>{t('doc_auth.tips.review_issues_selfie_text1')}</li>
<li>{t('doc_auth.tips.review_issues_selfie_text2')}</li>
<li>{t('doc_auth.tips.review_issues_selfie_text3')}</li>
<li>{t('doc_auth.tips.review_issues_selfie_text4')}</li>
</ul>
{isMobile || !hasMediaAccess() ? (
<AcuantCapture
ref={registerField('selfie', { isRequired: true })}
capture="user"
label={t('doc_auth.headings.document_capture_selfie')}
bannerText={t('doc_auth.headings.photo')}
value={value.selfie}
onChange={(nextSelfie) => onChange({ selfie: nextSelfie })}
allowUpload={false}
className="document-capture-review-issues-step__input"
errorMessage={selfieError?.message}
name="selfie"
/>
) : (
<SelfieCapture
ref={registerField('selfie', { isRequired: true })}
value={value.selfie}
onChange={(nextSelfie) => onChange({ selfie: nextSelfie })}
errorMessage={selfieError?.message}
className={[
'document-capture-review-issues-step__input',
!value.selfie && 'document-capture-review-issues-step__input--unconstrained-width',
]
.filter(Boolean)
.join(' ')}
/>
)}
</>
)}

<FormStepsButton.Submit />
<DocumentCaptureTroubleshootingOptions />
<Cancel />
Expand Down
Loading