feat(auth): support public auth bind endpoint

This commit is contained in:
Lemon-miaow committed 2026-07-03 02:11:57 +08:00
1 parent 5427bc7623
commit 55592ed123
7 files changed
+201 -36

No files matched your search

+4
View File
@@ -12,6 +12,7 @@ import type {
LinkResult,
LinkStatus,
LoginResult,
BindResult,
PlayersResult,
ServerInfo,
WhitelistImage,
@@ -99,6 +100,9 @@ export const api = {
// the tier model reads as `unauthenticated` and routes back to /login.
logout: () => request<{ ok: boolean }>("POST", "/auth/logout"),
bind: (code: string) =>
request<BindResult>("POST", "/auth/bind", { code }),
// changePassword is callable during the first-login lockdown (the route is
// AllowDuringPasswordChange): the server re-verifies current_password, rejects an
// unchanged or weak (8–72 byte) new password, writes the new hash, and revokes