feat(auth): add facebook identity psid login

This commit is contained in:
2026-07-10 17:07:22 +08:00
parent 2e60bf64e6
commit 53801490e5
28 changed files with 637 additions and 37 deletions
@@ -16,6 +16,7 @@
import type { Result } from "@/utils";
import type {
GuestLoginResponse,
LoginStatus,
LoginResponse,
RefreshTokenResponse,
} from "@/data/dto/auth";
@@ -66,6 +67,19 @@ export interface IAuthRepository {
psid?: string;
}): Promise<Result<LoginResponse>>;
/** 绑定 Facebook ASID / PSID 到当前登录用户。 */
bindFacebookIdentity(input: {
asid?: string;
psid?: string;
}): Promise<Result<void>>;
/** 通过 Facebook PSID 直接登录或返回游客态。 */
facebookPsidLogin(input: {
psid: string;
deviceId?: string;
bindToGuest?: boolean;
}): Promise<Result<LoginStatus>>;
/** 刷新 token:先读本地的 refresh token,空则返回错误。 */
refreshToken(): Promise<Result<RefreshTokenResponse>>;