flutterfire
flutterfire copied to clipboard
🐛 [App Check] App Check Returns Same Token Value
Bug report
App Check Returns Same Token Value of "eyJlcnJvciI6IlVOS05PV05fRVJST1IifQ==" in getToken Function.
Steps to reproduce
- Even using flutter app check example code make getToken() function return same value.
Sample project
https://pub.dev/packages/firebase_app_check/example
--
Flutter doctor
Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 3.0.4, on macOS 12.4 21F5058e darwin-arm, locale en-MM) [✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1) [✓] Xcode - develop for iOS and macOS (Xcode 13.4.1) [✓] Chrome - develop for the web [!] Android Studio ✗ Unable to find bundled Java version. [✓] Android Studio (version 2021.2) [✓] VS Code (version 1.68.1) [✓] Connected device (4 available) [✓] HTTP Host Availability
! Doctor found issues in 1 category.
Thanks for the report. I see the same behavior running plugin example, ie, after activating and then clicking on getToken()
, I see same token being generated.
Yes @darshankawar . Please let me know if you found any fix or trick to this issue.
A different token might be generated if the apk is signed by the Google PlayStore. https://github.com/firebase/flutterfire/discussions/7998#discussioncomment-2815263
I have the same problem on Android, but when using the DebugAppCheckProviderFactory and debug token, I can get the normal token.
I ran into the same problem and this fixed it for me: https://stackoverflow.com/a/73330541/4595843
@sithu-aung @darshankawar
Please use the latest API for activating app check: https://github.com/firebase/flutterfire/pull/9646. In any event, the same token being returned is coming from the native SDK, so I'd assume it is a user setup issue.
Please use the latest API for activating app check: #9646. In any event, the same token being returned is coming from the native SDK, so I'd assume it is a user setup issue.
Thank you @russellwheatley!