From e9e454cfc3b18b3329e9aff27b14a4dbeb0e3bc1 Mon Sep 17 00:00:00 2001 From: Maxime Lalo Date: Wed, 29 Nov 2023 16:52:38 +0100 Subject: [PATCH] :sparkles: Sending validation errors to totp --- .../Components/Layouts/LoginCustomer/StepTotp/index.tsx | 2 +- src/front/Components/Layouts/LoginCustomer/index.tsx | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/front/Components/Layouts/LoginCustomer/StepTotp/index.tsx b/src/front/Components/Layouts/LoginCustomer/StepTotp/index.tsx index 443c2369..635a52de 100644 --- a/src/front/Components/Layouts/LoginCustomer/StepTotp/index.tsx +++ b/src/front/Components/Layouts/LoginCustomer/StepTotp/index.tsx @@ -56,8 +56,8 @@ export default function StepTotp(props: IProps) { diff --git a/src/front/Components/Layouts/LoginCustomer/index.tsx b/src/front/Components/Layouts/LoginCustomer/index.tsx index c0a48bcc..c4f1e117 100644 --- a/src/front/Components/Layouts/LoginCustomer/index.tsx +++ b/src/front/Components/Layouts/LoginCustomer/index.tsx @@ -181,6 +181,14 @@ export default function Login() { try { await Auth.getInstance().sendAnotherCode({ email }); } catch (error: any) { + setValidationErrors([ + { + property: "totpCode", + constraints: { + [error.http_status]: error.message, + }, + }, + ]); return; } }, [email]);