feat(auth): add psid field to various login request DTOs and schemas
This commit is contained in:
@@ -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 ?? "",
|
||||
}),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -36,6 +36,7 @@ export interface IAuthRepository {
|
||||
username?: string;
|
||||
password: string;
|
||||
guestId?: string;
|
||||
psid?: string;
|
||||
}): Promise<Result<LoginResponse>>;
|
||||
|
||||
/** 退出真实用户登录并恢复游客态。 */
|
||||
@@ -48,18 +49,21 @@ export interface IAuthRepository {
|
||||
googleLogin(input: {
|
||||
idToken: string;
|
||||
guestId?: string;
|
||||
psid?: string;
|
||||
}): Promise<Result<LoginResponse>>;
|
||||
|
||||
/** Facebook 登录(accessToken 流程)。 */
|
||||
facebookLogin(input: {
|
||||
accessToken: string;
|
||||
guestId?: string;
|
||||
psid?: string;
|
||||
}): Promise<Result<LoginResponse>>;
|
||||
|
||||
/** Facebook ID 登录(v7.0 新增,fbId 流程)。 */
|
||||
facebookIdLogin(input: {
|
||||
fbId: string;
|
||||
avatarUrl?: string;
|
||||
psid?: string;
|
||||
}): Promise<Result<LoginResponse>>;
|
||||
|
||||
/** 刷新 token:先读本地的 refresh token,空则返回错误。 */
|
||||
|
||||
Reference in New Issue
Block a user