Skip to content

Commit

Permalink
fix(liveness): notify user on invalid signature errors
Browse files Browse the repository at this point in the history
closes #155
  • Loading branch information
JeffreyArt1 committed Dec 28, 2023
1 parent 6164d79 commit ba51fad
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/LivenessQuickStart/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ export function LivenessQuickStart({ cedula }: Props) {
message = JSON.parse(message).Message?.split(':')[0];
}

if (message.includes('Signature')) {
AlertError(intl.liveness.error.signature);
}

if (state === 'CAMERA_ACCESS_ERROR') {
AlertError(intl.liveness.camera.notFound.heading);
}
Expand Down
1 change: 1 addition & 0 deletions src/dictionaries/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@
"permissions": "Process again"
},
"error": {
"signature": "Signature has expired. Please verify your system's time settings and attempt again.",
"timeout": {
"heading": "Time's up",
"message": "The face did not fill the oval within the time limit. Try again and completely fill the oval with your face in 7 seconds."
Expand Down
1 change: 1 addition & 0 deletions src/dictionaries/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@
"permissions": "Procesar de nuevo"
},
"error": {
"signature": "Firma expirada. Verifique la configuración de hora de su sistema e intente de nuevo.",
"timeout": {
"heading": "Se acabó el tiempo",
"message": "La cara no llenó el óvalo dentro del límite de tiempo. Vuelva a intentarlo y llene completamente el óvalo con la cara en 7 segundos."
Expand Down

0 comments on commit ba51fad

Please sign in to comment.