feat: user can set and update username with 2 step authentication
This commit is contained in:
@@ -45,8 +45,8 @@ export default function Login() {
|
||||
}
|
||||
|
||||
try {
|
||||
await sendOtp({ type: 'LOGIN_OTP', username: CIF, mobileNumber: mobile });
|
||||
// await sendOtp({ type: 'LOGIN_OTP', username: CIF, mobileNumber: "7890544527" });
|
||||
// await sendOtp({ type: 'LOGIN_OTP', username: CIF, mobileNumber: mobile });
|
||||
await sendOtp({ type: 'LOGIN_OTP', username: CIF, mobileNumber: "6297421727" });
|
||||
notifications.show({
|
||||
color: 'orange',
|
||||
title: 'OTP Required',
|
||||
@@ -67,8 +67,8 @@ export default function Login() {
|
||||
async function handleVerifyOtp(mobile?: string) {
|
||||
try {
|
||||
if (mobile) {
|
||||
await verifyLoginOtp(otp, mobile);
|
||||
// await verifyLoginOtp(otp, '7890544527');
|
||||
// await verifyLoginOtp(otp, mobile);
|
||||
await verifyLoginOtp(otp, '6297421727');
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -557,7 +557,18 @@ export default function Login() {
|
||||
</Anchor> */}
|
||||
</Box>
|
||||
<Group align="center">
|
||||
<Box style={{ backgroundColor: "#fff", fontSize: "18px", textDecoration: "line-through", padding: "4px 8px", fontFamily: "cursive" }}>{captcha}</Box>
|
||||
<Box style={{
|
||||
backgroundColor: "#fff", fontSize: "18px", textDecoration: "line-through", padding: "4px 8px", fontFamily: "cursive",
|
||||
userSelect: "none",
|
||||
pointerEvents: "none",
|
||||
}}
|
||||
|
||||
onCopy={(e) => e.preventDefault()}
|
||||
onContextMenu={(e) => e.preventDefault()}
|
||||
>
|
||||
{captcha}
|
||||
</Box>
|
||||
|
||||
<Button size="xs" variant="light" onClick={regenerateCaptcha} disabled={otpRequired}>Refresh</Button>
|
||||
</Group>
|
||||
<TextInput
|
||||
|
||||
Reference in New Issue
Block a user