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