fix: otp related bugs
This commit is contained in:
@@ -77,6 +77,10 @@ const handleCieLogin = async () => {
|
||||
isCieLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
const handleOTPInput = async (value: string) => {
|
||||
console.log(value)
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -131,11 +135,22 @@ const handleCieLogin = async () => {
|
||||
</form>
|
||||
|
||||
<form v-else @submit.prevent="handleVerifyOtp">
|
||||
<div class="alert alert-success mb-4 small">
|
||||
<div v-show="!errorMessage" class="alert alert-success mb-4 small">
|
||||
Abbiamo inviato un codice OTP a <strong>{{ email }}</strong>.
|
||||
</div>
|
||||
<div class="form-group mb-4">
|
||||
<input type="text" class="form-control text-center text-tracking-widest fs-4" id="otp" v-model="otpCode" required maxlength="6" autocomplete="one-time-code">
|
||||
<input
|
||||
id="otp"
|
||||
v-model="otpCode"
|
||||
autocomplete="one-time-code"
|
||||
class="form-control text-center text-tracking-widest fs-4"
|
||||
inputmode="numeric"
|
||||
maxlength="6"
|
||||
pattern="[0-9]*"
|
||||
required
|
||||
type="text"
|
||||
@input="otpCode = otpCode.replace(/\D/g, '')"
|
||||
>
|
||||
<label for="otp" :class="{ 'active': otpCode.length > 0 }">Codice a 6 cifre</label>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary w-100 mb-3" :disabled="isLoading">
|
||||
|
||||
Reference in New Issue
Block a user