TF-2928 Show confirm dialog & handle exception when reload browser or loss of connection
This commit is contained in:
@@ -203,17 +203,6 @@ class AuthorizationInterceptors extends QueuedInterceptorsWrapper {
|
||||
|
||||
String _getTokenAsBearerHeader(String token) => 'Bearer $token';
|
||||
|
||||
bool get isAppRunning {
|
||||
switch(_authenticationType) {
|
||||
case AuthenticationType.basic:
|
||||
return _authorization != null;
|
||||
case AuthenticationType.oidc:
|
||||
return _configOIDC != null && _token != null;
|
||||
case AuthenticationType.none:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Future<PersonalAccount> _updateCurrentAccount({required TokenOIDC tokenOIDC}) async {
|
||||
final currentAccount = await _accountCacheManager.getCurrentAccount();
|
||||
|
||||
|
||||
@@ -172,8 +172,8 @@ class LoginController extends ReloadableController {
|
||||
}
|
||||
|
||||
@override
|
||||
void handleExceptionAction({Failure? failure, Exception? exception}) {
|
||||
logError('LoginController::handleExceptionAction:exception: $exception | failure: ${failure.runtimeType}');
|
||||
void handleUrgentException({Failure? failure, Exception? exception}) {
|
||||
logError('LoginController::handleUrgentException:Exception: $exception | Failure: $failure');
|
||||
if (failure is CheckOIDCIsAvailableFailure ||
|
||||
failure is GetStoredOidcConfigurationFailure ||
|
||||
failure is GetOIDCConfigurationFailure ||
|
||||
@@ -185,7 +185,7 @@ class LoginController extends ReloadableController {
|
||||
} else if (failure is GetSessionFailure) {
|
||||
clearAllData();
|
||||
} else {
|
||||
super.handleExceptionAction(failure: failure, exception: exception);
|
||||
super.handleUrgentException(failure: failure, exception: exception);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user