feat: implement resetting of password if forgotten
This commit is contained in:
parent
42ed743054
commit
17791fc017
5 changed files with 115 additions and 2 deletions
|
@ -18,6 +18,7 @@
|
|||
</div>
|
||||
<div v-else id="auth-form-container">
|
||||
<slot />
|
||||
<div v-if="useRoute().path != '/reset-password'">Forgot password? Recover <NuxtLink :href="resetPasswordUrl">here</NuxtLink>!</div>
|
||||
</div>
|
||||
<div v-if="instanceUrl">
|
||||
Instance URL is set to <span style="color: var(--primary-color);">{{ instanceUrl }}</span>
|
||||
|
@ -36,6 +37,12 @@ const apiVersion = useRuntimeConfig().public.apiVersion;
|
|||
const apiBase = useCookie("api_base");
|
||||
const registrationEnabled = useState("registrationEnabled", () => true);
|
||||
|
||||
const query = useRoute().query as Record<string, string>;
|
||||
const searchParams = new URLSearchParams(query);
|
||||
searchParams.delete("token");
|
||||
|
||||
const resetPasswordUrl = `/reset-password?${searchParams}`;
|
||||
|
||||
const auth = useAuth();
|
||||
|
||||
onMounted(async () => {
|
||||
|
@ -111,6 +118,7 @@ const form = reactive({
|
|||
#auth-form-container form {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
text-align: left;
|
||||
margin-top: 10dvh;
|
||||
gap: 1em;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue