feat(auth): support public auth bind endpoint
This commit is contained in:
7 files changed
+201
-36
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user