FCM token not created on user signup

Database & APIs

Hi,

I’m building a mobile application with FlutterFlow connected to Firebase (Auth, Firestore, Cloud Functions).

My app is working correctly for:

  • user authentication

  • user documents creation

  • events and other Firestore collections

However, I’m having an issue with Push Notifications (FCM).

When a new user is created:

  • the Firebase Auth user is created correctly

  • the Firestore users/{uid} document is created

  • but the FCM token is never stored

  • the users/{uid}/fcm_tokens subcollection is not created

In Android Studio logs, I see errors related to:

  • App Check token not being retrieved

  • Cloud Function addFcmTokenCode failing

  • sometimes returning unauthenticated

This seems to block the automatic FlutterFlow logic that should save the FCM token on signup.

What have you tried so far?
  • Enabled Push Notifications in FlutterFlow

  • Verified Firebase configuration (google-services.json, SHA-1 & SHA-256 are correctly added)

  • Verified that Firebase Auth and Firestore rules are correct

  • Checked that notification permission popup is shown and accepted

  • Tested with a release APK

  • Tested on Android emulator (I plan to test on a real device as well)

Regarding App Check:

  • App Check is enabled in Firebase with Play Integrity for Android

  • Firestore / Auth / Functions are currently in Surveillance mode, not enforced

  • Logs show errors like:

    • Error getting App Check token

    • using placeholder token

    • Cloud call error! addFcmTokenCode: unauthenticated

My understanding is that:

  • addFcmTokenCode is being called

  • but App Check or Auth context is not ready at that moment

  • so the FCM token never gets saved

My question:

  • Is it expected that the FCM token is not available at user creation time?

  • Should we manually handle token creation/update (Custom Action) instead of relying on FlutterFlow default behavior?

  • Is App Check compatible with FlutterFlow push notifications when testing outside Play Store distribution?

Did you check FlutterFlow's Documentation for this topic?
Yes
1
4 replies