pub async fn change_password(
current_password: String,
new_password: String,
) -> Result<ChangePasswordResponse, ServerFnError>Expand description
修改当前登录用户的密码。
校验当前密码 → 更新哈希并 bump session_generation(其他设备会话全部
失效)→ 删除该用户除当前 token 外的所有会话 → 刷新当前 token 的会话缓存
(写入新世代号),本端保持登录。Argon2 计算走 spawn_blocking。
Dioxus server function,注册在 /api 路径下。
§Handler information
- Method:
post - Path:
<auto>