refactor(auth): remove username fallback
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user