feat(auth): add psid field to various login request DTOs and schemas

This commit is contained in:
2026-07-10 16:33:29 +08:00
parent 4e06e08b15
commit dfcb06f5a9
13 changed files with 45 additions and 8 deletions
+8
View File
@@ -73,6 +73,7 @@ export class AuthRepository implements IAuthRepository {
username?: string;
password: string;
guestId?: string;
psid?: string;
}): Promise<Result<LoginResponse>> {
return Result.wrap(async () => {
const email = input.email?.trim() ?? "";
@@ -84,6 +85,7 @@ export class AuthRepository implements IAuthRepository {
password: input.password,
platform: getAuthPlatform(),
guestId: input.guestId ?? "",
psid: input.psid ?? "",
}),
),
);
@@ -173,6 +175,7 @@ export class AuthRepository implements IAuthRepository {
async googleLogin(input: {
idToken: string;
guestId?: string;
psid?: string;
}): Promise<Result<LoginResponse>> {
return this._socialLogin(LoginStatus.Google, () =>
this.api.googleLogin(
@@ -181,6 +184,7 @@ export class AuthRepository implements IAuthRepository {
idToken: input.idToken,
platform: getAuthPlatform(),
guestId: input.guestId ?? "",
psid: input.psid ?? "",
}),
),
),
@@ -191,6 +195,7 @@ export class AuthRepository implements IAuthRepository {
async facebookLogin(input: {
accessToken: string;
guestId?: string;
psid?: string;
}): Promise<Result<LoginResponse>> {
return this._socialLogin(LoginStatus.Facebook, () =>
this.api.facebookLogin(
@@ -199,6 +204,7 @@ export class AuthRepository implements IAuthRepository {
accessToken: input.accessToken,
platform: getAuthPlatform(),
guestId: input.guestId ?? "",
psid: input.psid ?? "",
}),
),
),
@@ -209,6 +215,7 @@ export class AuthRepository implements IAuthRepository {
async facebookIdLogin(input: {
fbId: string;
avatarUrl?: string;
psid?: string;
}): Promise<Result<LoginResponse>> {
return this._socialLogin(LoginStatus.Facebook, () =>
this.api.facebookIdLogin(
@@ -216,6 +223,7 @@ export class AuthRepository implements IAuthRepository {
withTestAccountFlag({
fbId: input.fbId,
avatarUrl: input.avatarUrl ?? "",
psid: input.psid ?? "",
}),
),
),