Add functional forgot-password flow and login modal UX updates

This commit is contained in:
2026-02-24 17:59:51 +01:00
parent 1c2353cfe1
commit 2a69ee8258
7 changed files with 161 additions and 2 deletions

View File

@@ -62,6 +62,20 @@ export async function registerUser({ email, username, plainPassword }) {
})
}
export async function requestPasswordReset(email) {
return apiFetch('/forgot-password', {
method: 'POST',
body: JSON.stringify({ email }),
})
}
export async function resetPassword({ token, email, password, password_confirmation }) {
return apiFetch('/reset-password', {
method: 'POST',
body: JSON.stringify({ token, email, password, password_confirmation }),
})
}
export async function logoutUser() {
return apiFetch('/logout', {
method: 'POST',