refractor(auth): removed password from everywhere
This commit is contained in:
@@ -14,14 +14,12 @@ const router = useRouter()
|
||||
const isLoading = ref(false)
|
||||
const errorMessage = ref('')
|
||||
const successMessage = ref(false)
|
||||
const showPassword = ref(false)
|
||||
|
||||
const form = ref({
|
||||
first_name: '',
|
||||
last_name: '',
|
||||
fiscal_code: '',
|
||||
email: '',
|
||||
password: '',
|
||||
phone: '',
|
||||
privacy: false
|
||||
})
|
||||
@@ -56,7 +54,6 @@ const handleRegister = async () => {
|
||||
last_name: form.value.last_name,
|
||||
fiscal_code: fiscalCode,
|
||||
email: form.value.email,
|
||||
password: form.value.password,
|
||||
phone: form.value.phone || undefined
|
||||
})
|
||||
|
||||
@@ -89,7 +86,7 @@ const handleRegister = async () => {
|
||||
<div class="card-body p-4 p-md-5">
|
||||
|
||||
<div v-if="successMessage" class="alert alert-success" role="alert">
|
||||
Registrazione completata con successo! Reindirizzamento al login...
|
||||
Registrazione completata con successo! Reindirizzamento all'accesso con OTP...
|
||||
</div>
|
||||
|
||||
<div v-if="errorMessage" class="alert alert-danger mb-4" role="alert">
|
||||
@@ -122,33 +119,15 @@ const handleRegister = async () => {
|
||||
<small class="form-text text-muted">Sarà utilizzato come identificativo univoco nel sistema PA.</small>
|
||||
</div>
|
||||
|
||||
<h2 class="h5 text-primary font-weight-bold mt-5 mb-4 border-bottom pb-2">Credenziali e Contatti</h2>
|
||||
<h2 class="h5 text-primary font-weight-bold mt-5 mb-4 border-bottom pb-2">Contatti</h2>
|
||||
|
||||
<div class="row mb-4">
|
||||
<div class="col-12 col-md-6 mb-4 mb-md-0">
|
||||
<div class="form-group">
|
||||
<div class="col-12">
|
||||
<div class="form-group position-relative">
|
||||
<input type="email" class="form-control" id="regEmail" v-model="form.email" required>
|
||||
<label for="regEmail" :class="{ 'active': form.email.length > 0 }">Indirizzo Email</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-6">
|
||||
<!-- INPUT PASSWORD FIXATO -->
|
||||
<div class="form-group position-relative">
|
||||
<input :type="showPassword ? 'text' : 'password'" class="form-control pe-5" id="regPwd" v-model="form.password" required minlength="10">
|
||||
<label for="regPwd" :class="{ 'active': form.password.length > 0 }">Password (min. 10 crt)</label>
|
||||
|
||||
<button
|
||||
type="button"
|
||||
class="btn bg-transparent border-0 shadow-none position-absolute p-2"
|
||||
style="right: 0; top: 2px; z-index: 10;"
|
||||
@click="showPassword = !showPassword"
|
||||
:aria-pressed="showPassword"
|
||||
aria-label="Mostra/Nascondi password"
|
||||
>
|
||||
<BIIcon :name="showPassword ? 'it-password-visible' : 'it-password-invisible'" color="primary" size="sm" />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-5">
|
||||
@@ -169,6 +148,9 @@ const handleRegister = async () => {
|
||||
<span v-if="isLoading" class="spinner-border spinner-border-sm me-2" role="status"></span>
|
||||
Registra Profilo
|
||||
</button>
|
||||
<p class="small text-muted mt-3 mb-0">
|
||||
Dopo la registrazione potrai accedere usando OTP via email o CIE, quando disponibile.
|
||||
</p>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
@@ -185,8 +167,4 @@ const handleRegister = async () => {
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
/* Previene che il testo finisca sotto l'icona */
|
||||
.pe-5 {
|
||||
padding-right: 3rem !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user