✨ Sending validation errors to totp
This commit is contained in:
parent
7e7725c8ff
commit
e9e454cfc3
@ -56,8 +56,8 @@ export default function StepTotp(props: IProps) {
|
|||||||
<Button
|
<Button
|
||||||
variant={EButtonVariant.LINE}
|
variant={EButtonVariant.LINE}
|
||||||
disabled={disableNewCodeButton}
|
disabled={disableNewCodeButton}
|
||||||
onClick={sendAnotherCode}
|
|
||||||
data-disabled={disableNewCodeButton.toString()}
|
data-disabled={disableNewCodeButton.toString()}
|
||||||
|
onClick={sendAnotherCode}
|
||||||
className={classes["new-code-button"]}>
|
className={classes["new-code-button"]}>
|
||||||
Envoyer un nouveau code
|
Envoyer un nouveau code
|
||||||
</Button>
|
</Button>
|
||||||
|
@ -181,6 +181,14 @@ export default function Login() {
|
|||||||
try {
|
try {
|
||||||
await Auth.getInstance().sendAnotherCode({ email });
|
await Auth.getInstance().sendAnotherCode({ email });
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
|
setValidationErrors([
|
||||||
|
{
|
||||||
|
property: "totpCode",
|
||||||
|
constraints: {
|
||||||
|
[error.http_status]: error.message,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
]);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}, [email]);
|
}, [email]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user