5

I'm creating Firebase Remote config experiment with A/B testing for my Flutter app. For validating the experiment on test device I need to get Firebase installation auth token that associated with each Firebase installation.

How can I get this token in "Flutter-way"? In docs there is way to get it for Swift, Kotlin etc.. But not for Dart/Flutter.

In my app I have firebase_core package installed and FirebaseOptions has a bunch of ids:

this.apiKey,
this.appId,
this.messagingSenderId,
this.projectId,
this.measurementId,

But no Firebase Installation Auth Token.

ivanesi
  • 1,603
  • 2
  • 15
  • 26

2 Answers2

0

The easiest way is if you've got the firebase cloud messaging installed as well, getting the token from there. In my app I didn't so I wanted to figure this out myself so I wrote a small package to solve this.

I'm not sure if it works on any type of device as I've only tried it locally on the devices I have (Android and iOS) but using this token you can do the AB testing in firebase console.

https://pub.dev/packages/firebase_device_id

Almund
  • 5,695
  • 3
  • 31
  • 35
0

firebase_app _installations is a new Flutter package from the Firebase dev team that I believe will provide you with what you need.

Lee3
  • 2,882
  • 1
  • 11
  • 19