Skip to content

FCM Device token is getting stored in Cache.db file as plaintext #14352

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ashitanema98 opened this issue Jan 15, 2025 · 2 comments · Fixed by #14355
Closed

FCM Device token is getting stored in Cache.db file as plaintext #14352

ashitanema98 opened this issue Jan 15, 2025 · 2 comments · Fixed by #14355

Comments

@ashitanema98
Copy link

Description

With some recent testing over iOS, I found the device token generated at the start of the Flutter App instance is getting stored in the device's filesystem, in the Cache.db database inside the application sandbox, in an unencrypted format.

token={{token_value}}

Is there any way to avoid it ?

Reproducing the issue

  •  Run a flutter app, having push notification service using FCM enabled.
    
  • After the app runs successfully, go the path 
    

~/Data/Application/<APP ID>/Library/Caches/<PACKAGE ID : com.myapp...>/Cache.db

  • Open the Cache.db file with any SQL DB viewer software, I have used SQLite.
    
  • Under the tables, you can see some data like : token={{token_value}}
    

Firebase SDK Version

10.29.0

Xcode Version

16.2

Installation Method

CocoaPods

Firebase Product(s)

Messaging, AB Testing, Analytics, App Distribution, Crashlytics, DynamicLinks, Performance

Targeted Platforms

iOS

Relevant Log Output

If using Swift Package Manager, the project's Package.resolved

Expand Package.resolved snippet
Replace this line with the contents of your Package.resolved.

If using CocoaPods, the project's Podfile.lock

Expand Podfile.lock snippet
Replace this line with the contents of your Podfile.lock!
@google-oss-bot
Copy link

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

@paulb777
Copy link
Member

Internally tracked at b/390380574

@firebase firebase locked and limited conversation to collaborators Feb 16, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants