added support for resetting a password while logged in
This commit is contained in:
parent
2ba24773d1
commit
199affd2d6
6 changed files with 126 additions and 12 deletions
35
app/pages/auth/forgot-password.vue
Normal file
35
app/pages/auth/forgot-password.vue
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
<script lang="ts" setup>
|
||||
|
||||
import ButtonAction from "~/components/common/button-action.vue";
|
||||
|
||||
definePageMeta({
|
||||
layout: 'auth'
|
||||
})
|
||||
|
||||
const {forgotPassword} = useAuth();
|
||||
const email = ref("");
|
||||
const handlePasswordReset = () => {
|
||||
forgotPassword(email.value);
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<form class="forgot-password-form">
|
||||
<label for="email">Email</label>
|
||||
<input id="email" v-model="email" type="email"/>
|
||||
<ButtonAction button-text="Send Reset Link" @action="handlePasswordReset"/>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
form {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
</style>
|
||||
Loading…
Add table
Add a link
Reference in a new issue