Integrating AWS Face Liveness in React without Cognito Identity pool ID

0

Is Cognito Identity pool ID required to use Face Liveness in React front end. I am trying to integrate Face Liveness in my React project, backend has already provided a session ID and region, so I just plug it in <FaceLivenessDetector />. The issue is, when it runs, Face Liveness will throw me error from onError saying that "No Cognito Identity pool provided for unauthenticated access". But when building for android, we can skip auth all together. So is there anyways to skip auth for React as well?

Note: Only notable package used is @aws-amplify/ui-react-liveness from NPM

<FaceLivenessDetector
          sessionId={getProfileVerifyInitiateData?.data?.uvp?.session_id}
          region={getProfileVerifyInitiateData?.data?.uvp?.region}
          onAnalysisComplete={handleAnalysisComplete}
          onError={onFaceLivenessDetectorError}
/>

Face Liveness Doc

Bryan
asked 8 months ago194 views
1 Answer
0

Hi Bryan,

Thanks for reaching out.

For using the FaceLivenessDetector component in a React based front-end, it is recommended to use Cognito Identity Pool as it handles the credentials sourcing with least privilege permissions and their expiry.

Managing credentials yourself on a web-app is challenging and can easily lead to security vulnerability if done incorrectly. If you have a secure way of managing credentials, you can use a custom credentials provider in the FaceLivenessDetectorCore component to get around using a Cognito Identity Pool.

Regards,

AWS Team

AWS
answered 2 months ago
profile picture
EXPERT
reviewed a month ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions