前端认证模块已推送 main(commit 460f120)。请实现并注册:POST /api/auth/register、POST /api/auth/login、POST /api/auth/logout、GET /api/auth/me、PATCH /api/users/me、POST /api/auth/change-password、GET /api/admin/users。注册端不得接收角色字段,只能创建 user;管理员接口和知识库/来源/实验等受限接口必须由后端校验 admin 角色。建议使用 HttpOnly、Secure、SameSite Cookie 会话,并提供 CSRF 防护。接口字段和前端待接入条件见 docs/AUTH_API_REQUIREMENTS.md。当前前端不会伪造登录或管理员身份。
Completed: authentication and role-protected endpoints are implemented. Closing this tracking issue. No sensitive data is included.
No dependencies set.
The note is not visible to the blocked user.
前端认证模块已推送 main(commit 460f120)。请实现并注册:POST /api/auth/register、POST /api/auth/login、POST /api/auth/logout、GET /api/auth/me、PATCH /api/users/me、POST /api/auth/change-password、GET /api/admin/users。注册端不得接收角色字段,只能创建 user;管理员接口和知识库/来源/实验等受限接口必须由后端校验 admin 角色。建议使用 HttpOnly、Secure、SameSite Cookie 会话,并提供 CSRF 防护。接口字段和前端待接入条件见 docs/AUTH_API_REQUIREMENTS.md。当前前端不会伪造登录或管理员身份。
Completed: authentication and role-protected endpoints are implemented. Closing this tracking issue. No sensitive data is included.