TF-607 Implement logoutOidc action when user click signOut

This commit is contained in:
dab246
2022-06-03 11:34:18 +07:00
committed by Dat H. Pham
parent 45fbbc6a6f
commit ced3fecd1f
16 changed files with 184 additions and 20 deletions
@@ -23,5 +23,5 @@ abstract class AuthenticationOIDCRepository {
List<String> scopes,
String refreshToken);
Future<void> logout(TokenId tokenId, OIDCConfiguration config);
Future<bool> logout(TokenId tokenId, OIDCConfiguration config);
}
@@ -24,6 +24,7 @@ class GetAuthenticatedAccountInteractor {
try {
yield Right<Failure, Success>(LoadingState());
final account = await _accountRepository.getCurrentAccount();
log('GetAuthenticatedAccountInteractor::execute(): account: $account');
yield Right(GetAuthenticatedAccountSuccess(account));
if (account.authenticationType == AuthenticationType.oidc) {
yield* _getStoredTokenOidcInteractor.execute(account.id);
@@ -18,6 +18,7 @@ class GetStoredTokenOidcInteractor {
Stream<Either<Failure, Success>> execute(String tokenIdHash) async* {
try {
log('GetStoredTokenOidcInteractor::execute(): tokenIdHash: $tokenIdHash');
yield Right<Failure, Success>(LoadingState());
final futureValue = await Future.wait([
_credentialRepository.getBaseUrl(),