⚒️ 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
+9 -10
View File
@@ -262,15 +262,15 @@ abstract class BaseController extends GetxController
void logout(Session? session, AccountId? accountId) {
_isFcmEnabled = fcmEnabled(session, accountId);
if (_isFcmEnabled) {
final authenticationType = authorizationInterceptors.authenticationType;
if (authenticationType == AuthenticationType.oidc) {
consumeState(logoutOidcInteractor.execute());
} else {
_getSubscriptionLocalAction();
}
final authenticationType = authorizationInterceptors.authenticationType;
if (authenticationType == AuthenticationType.oidc) {
consumeState(logoutOidcInteractor.execute());
} else {
checkAuthenticationTypeWhenLogout();
if (_isFcmEnabled) {
_getSubscriptionLocalAction();
} else {
logoutAction();
}
}
}
@@ -333,6 +333,5 @@ abstract class BaseController extends GetxController
_fcmReceiver.deleteFcmToken();
}
await cachingManager.closeHive();
goToLogin(arguments: LoginArguments(LoginFormType.ssoForm));
}
}
}