From 4fca87bde1305b51be1cdc304515a7254fb5c432 Mon Sep 17 00:00:00 2001 From: Achintha Isuru Date: Mon, 16 Mar 2026 22:56:15 -0400 Subject: [PATCH] Refactor auth repo imports; remove unused flag MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Consolidate and reorder imports in the client authentication repository by moving the auth_repository_interface import to the top and removing the duplicate import. Also remove the unused UnauthorizedAppException reference from the imported symbols. In the staff authentication repository, drop the unused requiresProfileSetup variable (extracted from API response) and tidy up minor whitespace—removing dead code and silencing analyzer warnings. --- .../lib/src/data/repositories_impl/auth_repository_impl.dart | 4 +--- .../lib/src/data/repositories_impl/auth_repository_impl.dart | 3 --- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/apps/mobile/packages/features/client/authentication/lib/src/data/repositories_impl/auth_repository_impl.dart b/apps/mobile/packages/features/client/authentication/lib/src/data/repositories_impl/auth_repository_impl.dart index 433a30d1..4f84d295 100644 --- a/apps/mobile/packages/features/client/authentication/lib/src/data/repositories_impl/auth_repository_impl.dart +++ b/apps/mobile/packages/features/client/authentication/lib/src/data/repositories_impl/auth_repository_impl.dart @@ -1,5 +1,6 @@ import 'dart:developer' as developer; +import 'package:client_authentication/src/domain/repositories/auth_repository_interface.dart'; import 'package:firebase_auth/firebase_auth.dart' as firebase; import 'package:krow_core/core.dart'; import 'package:krow_domain/krow_domain.dart' @@ -14,13 +15,10 @@ import 'package:krow_domain/krow_domain.dart' PasswordMismatchException, SignInFailedException, SignUpFailedException, - UnauthorizedAppException, User, UserStatus, WeakPasswordException; -import 'package:client_authentication/src/domain/repositories/auth_repository_interface.dart'; - /// Production implementation of the [AuthRepositoryInterface] for the client app. /// /// Uses Firebase Auth client-side for sign-in (to maintain local auth state for diff --git a/apps/mobile/packages/features/staff/authentication/lib/src/data/repositories_impl/auth_repository_impl.dart b/apps/mobile/packages/features/staff/authentication/lib/src/data/repositories_impl/auth_repository_impl.dart index 06a6dbd6..df41895d 100644 --- a/apps/mobile/packages/features/staff/authentication/lib/src/data/repositories_impl/auth_repository_impl.dart +++ b/apps/mobile/packages/features/staff/authentication/lib/src/data/repositories_impl/auth_repository_impl.dart @@ -3,7 +3,6 @@ import 'dart:async'; import 'package:firebase_auth/firebase_auth.dart'; import 'package:krow_core/core.dart'; import 'package:krow_domain/krow_domain.dart' as domain; - import 'package:staff_authentication/src/domain/repositories/auth_repository_interface.dart'; import 'package:staff_authentication/src/domain/ui_entities/auth_mode.dart'; import 'package:staff_authentication/src/utils/test_phone_numbers.dart'; @@ -193,8 +192,6 @@ class AuthRepositoryImpl implements AuthRepositoryInterface { final Map data = response.data as Map; // Step 4: Check for business logic errors from the V2 API. - final bool requiresProfileSetup = - data['requiresProfileSetup'] as bool? ?? false; final Map? staffData = data['staff'] as Map?; final Map? userData =