Add functional forgot-password flow and login modal UX updates
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user