Does Firebase Anonymous Authentication Survive When Clearing App Cache?
Solution 1:
No, it will not survive. No data previously saved by the app will survive. The whole point of clearing app data is to make the app behave as if it was newly installed.
Solution 2:
Anonymous auth is not intended to be a permanent user id. If your use case is for it to last as long as the app does, you should provide the option to upgrade to a permanent account or find an alternative authentication method, such as signing your own tokens, or using phone number or email auth.
To directly answer the question, Anonymous Authentication only survives as long as the token on Android, and the token is stored in local cache and will be cleared when you clear the app data.
In web, token is stored in indexedDB. We fallback to localStorage if indexedDB is not available. For Android, we use SharedPreferences. For iOS, we use the keychain. So this is untrue in iOS, where the keychain will survive app reinstalls.
Post a Comment for "Does Firebase Anonymous Authentication Survive When Clearing App Cache?"