TF-644 Remove 401 error when refreshToken

This commit is contained in:
dab246
2022-06-13 18:02:06 +07:00
committed by Dat H. Pham
parent 4a2addd77a
commit ba4663257d
@@ -77,7 +77,8 @@ class AuthorizationInterceptors extends InterceptorsWrapper {
void onError(DioError err, ErrorInterceptorHandler handler) async {
final requestOptions = err.requestOptions;
log('AuthorizationInterceptors::onError(): $err');
if ((_isTokenExpired() || err.response?.statusCode == 401) &&
if (_isTokenExpired() &&
err.response?.statusCode == 401 &&
_isAuthenticationOidcValid()) {
try {
final newToken = await _authenticationClient.refreshingTokensOIDC(