✨ 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
|
||||
variant={EButtonVariant.LINE}
|
||||
disabled={disableNewCodeButton}
|
||||
onClick={sendAnotherCode}
|
||||
data-disabled={disableNewCodeButton.toString()}
|
||||
onClick={sendAnotherCode}
|
||||
className={classes["new-code-button"]}>
|
||||
Envoyer un nouveau code
|
||||
</Button>
|
||||
|
@ -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]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user