secureStorage property

FlutterSecureStorage? secureStorage
getter/setter pair

instance of FlutterSecureStorage to use for the OidcStoreNamespace.secureTokens namespace.

When this is null, the OidcStoreNamespace.secureTokens namespace falls back to package:shared_preferences, which is not secure (it is plaintext on most platforms and localStorage on web). For the hardened at-rest posture on Android/iOS/macOS, pass createHardenedSecureStorage.

On web there is no real secret-storage primitive: shared_preferences maps to localStorage, which is readable by any injected script (Browser-Based Apps BCP ยง8). Prefer a BFF (tokens behind HttpOnly cookies) or in-memory storage with service-worker refresh; treat web persistence as best-effort.

Implementation

FlutterSecureStorage? secureStorage;