# Which Caching Method Does auth0\_flutter Use Across Mobile and Web?

**URL:** <https://community.auth0.com/t/which-caching-method-does-auth0-flutter-use-across-mobile-and-web/185109>\
**Category:** Get Help\
**Tags:** classic-universal-login-experience, login-experience\
**Created:** [April 7, 2025, 1:05pm UTC](https://community.auth0.com/t/which-caching-method-does-auth0-flutter-use-across-mobile-and-web/185109 "2025-04-07T13:05:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![furkanacar](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/furkanacar/32/72238_2.png) [@furkanacar](https://community.auth0.com/u/furkanacar)\
**Post date:** [April 7, 2025, 1:05pm UTC](https://community.auth0.com/t/which-caching-method-does-auth0-flutter-use-across-mobile-and-web/185109/1 "2025-04-07T13:05:34Z")

</div>

I’m currently integrating the `auth0_flutter` package into my Flutter application and I’m curious about how it handles token or session caching. Specifically, does it rely on `flutter_secure_storage` (or a similar mechanism) for data persistence on mobile devices, and is the caching approach different when targeting web platforms?

---

<div class="post-metadata">

**Author:** ![nik.baleca](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nik.baleca/32/68749_2.png) [@nik.baleca](https://community.auth0.com/u/nik.baleca)\
**Post date:** [April 7, 2025, 3:58pm UTC](https://community.auth0.com/t/which-caching-method-does-auth0-flutter-use-across-mobile-and-web/185109/3 "2025-04-07T15:58:25Z")

</div>

Hi @furkanacar

Welcome to the Auth0 Community!  
For Android and iOS, the caching can be handled via` flutter_secure_storage` as mentioned by the [Flutter Package Documentation](https://pub.dev/packages/flutter_secure_storage#flutter_secure_storage):

> A Flutter plugin to store data in secure storage:
> 
> - [Keychain](https://developer.apple.com/library/content/documentation/Security/Conceptual/keychainServConcepts/01introduction/introduction.html#//apple_ref/doc/uid/TP30000897-CH203-TP1) is used for iOS
> - AES encryption is used for Android. AES secret key is encrypted with RSA and RSA key is stored in [KeyStore](https://developer.android.com/training/articles/keystore.html)
> - With V5.0.0 we can use [EncryptedSharedPreferences](https://developer.android.com/topic/security/data) on Android by enabling it in the Android Options like so:
> 
> ```auto
> AndroidOptions _getAndroidOptions() => const AndroidOptions(
> encryptedSharedPreferences: true,
> );
> 
> ```
> 
> For more information see the example app.
> 
> - [`libsecret`](https://wiki.gnome.org/Projects/Libsecret) is used for Linux.
> 
> _Note_ KeyStore was introduced in Android 4.3 (API level 18). The plugin wouldn’t work for earlier versions.

Otherwise, for web platforms, the management and storage of credentials is handled internally by the [Auth0 SPA SDK](https://github.com/auth0/auth0-spa-js), this also includes the refreshing of access tokens when they expires. The Flutter SDK provides an API for checking whether credentials are available, and the retrieval of those credentials.

You can read more about that [here](https://github.com/auth0/auth0-flutter/blob/main/auth0_flutter/EXAMPLES.md#-handling-credentials-on-the-web).

If you have any other questions regarding the matter, please let me know!

Kind Regards,  
Nik

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [April 21, 2025, 3:59pm UTC](https://community.auth0.com/t/which-caching-method-does-auth0-flutter-use-across-mobile-and-web/185109/4 "2025-04-21T15:59:04Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
