app: Implement the second part of password reset

This commit is contained in:
Valentin Tolmer
2021-11-22 23:30:12 +01:00
committed by nitnelave
parent 9fb4afcf60
commit 4a5abfd395
5 changed files with 252 additions and 1 deletions

View File

@@ -241,7 +241,19 @@ impl HostService {
&format!("/auth/reset/step1/{}", username),
yew::format::Nothing,
callback,
"Could not logout",
"Could not initiate password reset",
)
}
pub fn reset_password_step2(
token: &str,
callback: Callback<Result<String>>,
) -> Result<FetchTask> {
call_server_json_with_error_message(
&format!("/auth/reset/step2/{}", token),
yew::format::Nothing,
callback,
"Could not validate token",
)
}
}