pub async fn login(
username: String,
password: String,
) -> Result<AuthResponse, ServerFnError>Expand description
用户登录。
验证用户名/邮箱与密码,生成会话并写入 HttpOnly Cookie;
同一用户活跃会话数超过 MAX_SESSIONS_PER_USER 时删除最早会话。
Dioxus server function,注册在 /api 路径下。
§Handler information
- Method:
post - Path:
<auto>