diff --git a/packages/oidc4vc/lib/src/oidc4vc.dart b/packages/oidc4vc/lib/src/oidc4vc.dart index c00c19d65..84aa85714 100644 --- a/packages/oidc4vc/lib/src/oidc4vc.dart +++ b/packages/oidc4vc/lib/src/oidc4vc.dart @@ -1758,27 +1758,27 @@ class OIDC4VC { dio.options.headers = headers; - if (isCachingEnabled) { - final secureStorageProvider = getSecureStorage; - final cachedData = await secureStorageProvider.get(uri); - if (cachedData == null) { - response = await dio.get(uri); - } else { - final cachedDataJson = jsonDecode(cachedData); - final expiry = int.parse(cachedDataJson['expiry'].toString()); - - final isExpired = DateTime.now().millisecondsSinceEpoch > expiry; - - if (isExpired) { - response = await dio.get(uri); - } else { - /// directly return cached data - /// returned here to avoid the caching override everytime - final response = await cachedDataJson['data']; - return response; - } - } - } + // if (isCachingEnabled) { + // final secureStorageProvider = getSecureStorage; + // final cachedData = await secureStorageProvider.get(uri); + // if (cachedData == null) { + // response = await dio.get(uri); + // } else { + // final cachedDataJson = jsonDecode(cachedData); + // final expiry = int.parse(cachedDataJson['expiry'].toString()); + + // final isExpired = DateTime.now().millisecondsSinceEpoch > expiry; + + // if (isExpired) { + // response = await dio.get(uri); + // } else { + // /// directly return cached data + // /// returned here to avoid the caching override everytime + // final response = await cachedDataJson['data']; + // return response; + // } + // } + // } // temporary deactiviting this caching du to issue with // flutter_secure_storage on ios #2657 // final expiry = @@ -1786,6 +1786,7 @@ class OIDC4VC { // final value = {'expiry': expiry, 'data': response.data}; // await secureStorageProvider.set(uri, jsonEncode(value)); + response = await dio.get(uri); return response.data; } on FormatException {