diff --git a/lib/features/login/data/local/authentication_info_cache_manager.dart b/lib/features/login/data/local/authentication_info_cache_manager.dart index 7c8cc9d9d..e200a361a 100644 --- a/lib/features/login/data/local/authentication_info_cache_manager.dart +++ b/lib/features/login/data/local/authentication_info_cache_manager.dart @@ -12,8 +12,8 @@ class AuthenticationInfoCacheManager { authenticationInfoCache); } - Future getAuthenticationInfoStored({bool needToReopen = false}) { - return _authenticationInfoCacheClient.getItem(AuthenticationInfoCache.keyCacheValue, needToReopen: needToReopen); + Future getAuthenticationInfoStored() { + return _authenticationInfoCacheClient.getItem(AuthenticationInfoCache.keyCacheValue); } Future removeAuthenticationInfo() { diff --git a/lib/features/login/data/repository/credential_repository_impl.dart b/lib/features/login/data/repository/credential_repository_impl.dart index 709fb5eb5..13973ee97 100644 --- a/lib/features/login/data/repository/credential_repository_impl.dart +++ b/lib/features/login/data/repository/credential_repository_impl.dart @@ -36,8 +36,8 @@ class CredentialRepositoryImpl extends CredentialRepository { } @override - Future getAuthenticationInfoStored({bool needToReopen = false}) { - return _authenticationInfoCacheManager.getAuthenticationInfoStored(needToReopen: needToReopen); + Future getAuthenticationInfoStored() { + return _authenticationInfoCacheManager.getAuthenticationInfoStored(); } @override diff --git a/lib/features/login/domain/repository/credential_repository.dart b/lib/features/login/domain/repository/credential_repository.dart index 21c7a08d5..805e70379 100644 --- a/lib/features/login/domain/repository/credential_repository.dart +++ b/lib/features/login/domain/repository/credential_repository.dart @@ -9,7 +9,7 @@ abstract class CredentialRepository { Future storeAuthenticationInfo(AuthenticationInfoCache authenticationInfoCache); - Future getAuthenticationInfoStored({bool needToReopen = false}); + Future getAuthenticationInfoStored(); Future removeAuthenticationInfo(); } \ No newline at end of file diff --git a/lib/features/login/domain/usecases/get_authenticated_account_interactor.dart b/lib/features/login/domain/usecases/get_authenticated_account_interactor.dart index ea3179fc1..de2eab1b7 100644 --- a/lib/features/login/domain/usecases/get_authenticated_account_interactor.dart +++ b/lib/features/login/domain/usecases/get_authenticated_account_interactor.dart @@ -20,7 +20,7 @@ class GetAuthenticatedAccountInteractor { this._getStoredTokenOidcInteractor ); - Stream> execute({bool needToReopen = false}) async* { + Stream> execute() async* { try { yield Right(LoadingState()); final account = await _accountRepository.getCurrentAccount(); @@ -29,7 +29,7 @@ class GetAuthenticatedAccountInteractor { if (account.authenticationType == AuthenticationType.oidc) { yield* _getStoredTokenOidcInteractor.execute(account.id); } else { - yield await _getCredentialInteractor.execute(needToReopen: needToReopen); + yield await _getCredentialInteractor.execute(); } } catch (e) { logError('GetAuthenticatedAccountInteractor::execute(): $e'); diff --git a/lib/features/login/domain/usecases/get_credential_interactor.dart b/lib/features/login/domain/usecases/get_credential_interactor.dart index 40ff8f8be..b2dd3f903 100644 --- a/lib/features/login/domain/usecases/get_credential_interactor.dart +++ b/lib/features/login/domain/usecases/get_credential_interactor.dart @@ -15,10 +15,10 @@ class GetCredentialInteractor { GetCredentialInteractor(this.credentialRepository); - Future> execute({bool needToReopen = false}) async { + Future> execute() async { try { final baseUrl = await credentialRepository.getBaseUrl(); - final authenticationInfo = await credentialRepository.getAuthenticationInfoStored(needToReopen: needToReopen); + final authenticationInfo = await credentialRepository.getAuthenticationInfoStored(); if (isCredentialValid(baseUrl) && authenticationInfo != null) { return Right(GetCredentialViewState( baseUrl,