refactor(auth): remove username fallback

This commit is contained in:
2026-07-03 15:00:10 +08:00
parent f1e9974bd8
commit 79324defcf
+1 -9
View File
@@ -76,7 +76,7 @@ export class AuthRepository implements IAuthRepository {
LoginRequest.from(
withTestAccountFlag({
email,
username: resolveLoginUsername(input.username, email),
username: input.username,
password: input.password,
platform: getAuthPlatform(),
guestId: input.guestId ?? "",
@@ -341,11 +341,3 @@ function withTestAccountFlag<T extends Record<string, unknown>>(
function getAuthPlatform(): string {
return PlatformDetector.getPlatform();
}
function resolveLoginUsername(
username: string | undefined,
email: string,
): string {
const trimmedUsername = username?.trim() ?? "";
return trimmedUsername.length > 0 ? trimmedUsername : email;
}