feat(auth): rename facebookIdLogin to facebookAsidLogin and update related references
This commit is contained in:
@@ -211,9 +211,9 @@ export class AuthRepository implements IAuthRepository {
|
||||
);
|
||||
}
|
||||
|
||||
/** Facebook ID 登录(v7.0 新增,fbId 流程)。 */
|
||||
async facebookIdLogin(input: {
|
||||
fbId: string;
|
||||
/** 通过 ASID 登录。 */
|
||||
async facebookAsidLogin(input: {
|
||||
asid: string;
|
||||
avatarUrl?: string;
|
||||
psid?: string;
|
||||
}): Promise<Result<LoginResponse>> {
|
||||
@@ -221,7 +221,7 @@ export class AuthRepository implements IAuthRepository {
|
||||
this.api.facebookIdLogin(
|
||||
FbIdLoginRequest.from(
|
||||
withTestAccountFlag({
|
||||
fbId: input.fbId,
|
||||
fbId: input.asid,
|
||||
avatarUrl: input.avatarUrl ?? "",
|
||||
psid: input.psid ?? "",
|
||||
}),
|
||||
|
||||
@@ -59,9 +59,9 @@ export interface IAuthRepository {
|
||||
psid?: string;
|
||||
}): Promise<Result<LoginResponse>>;
|
||||
|
||||
/** Facebook ID 登录(v7.0 新增,fbId 流程)。 */
|
||||
facebookIdLogin(input: {
|
||||
fbId: string;
|
||||
/** 通过 ASID 登录。 */
|
||||
facebookAsidLogin(input: {
|
||||
asid: string;
|
||||
avatarUrl?: string;
|
||||
psid?: string;
|
||||
}): Promise<Result<LoginResponse>>;
|
||||
|
||||
@@ -261,8 +261,8 @@ export const checkAuthStatusActor = fromPromise<LoginStatus, void>(async () => {
|
||||
const authRepo = getAuthRepository();
|
||||
const avatarUrlR = await UserStorage.getInstance().getAvatarUrl();
|
||||
const psid = await readPsid();
|
||||
const result = await authRepo.facebookIdLogin({
|
||||
fbId: asidR.data,
|
||||
const result = await authRepo.facebookAsidLogin({
|
||||
asid: asidR.data,
|
||||
avatarUrl: avatarUrlR.success ? avatarUrlR.data ?? undefined : undefined,
|
||||
psid,
|
||||
});
|
||||
@@ -270,7 +270,7 @@ export const checkAuthStatusActor = fromPromise<LoginStatus, void>(async () => {
|
||||
if (Result.isErr(result)) {
|
||||
log.warn(
|
||||
{ err: result.error.message },
|
||||
"[auth-machine] checkAuthStatusActor: facebookIdLogin failed",
|
||||
"[auth-machine] checkAuthStatusActor: facebookAsidLogin failed",
|
||||
);
|
||||
return "notLoggedIn" as LoginStatus;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user