⚒️ Fix Logout error

(cherry picked from commit 5162c145874cdb593aa28617d69f92330fde39d6)
This commit is contained in:
Dat PHAM HOANG
2023-03-25 13:07:17 +01:00
committed by Dat Vu
parent d6045c8361
commit ab82a91cec
+3 -4
View File
@@ -262,15 +262,15 @@ abstract class BaseController extends GetxController
void logout(Session? session, AccountId? accountId) { void logout(Session? session, AccountId? accountId) {
_isFcmEnabled = fcmEnabled(session, accountId); _isFcmEnabled = fcmEnabled(session, accountId);
if (_isFcmEnabled) {
final authenticationType = authorizationInterceptors.authenticationType; final authenticationType = authorizationInterceptors.authenticationType;
if (authenticationType == AuthenticationType.oidc) { if (authenticationType == AuthenticationType.oidc) {
consumeState(logoutOidcInteractor.execute()); consumeState(logoutOidcInteractor.execute());
} else { } else {
if (_isFcmEnabled) {
_getSubscriptionLocalAction(); _getSubscriptionLocalAction();
}
} else { } else {
checkAuthenticationTypeWhenLogout(); logoutAction();
}
} }
} }
@@ -333,6 +333,5 @@ abstract class BaseController extends GetxController
_fcmReceiver.deleteFcmToken(); _fcmReceiver.deleteFcmToken();
} }
await cachingManager.closeHive(); await cachingManager.closeHive();
goToLogin(arguments: LoginArguments(LoginFormType.ssoForm));
} }
} }