Ad

Apple Rejected The App Due To "Token Mismatch" Authentication Error In A Flutter App With Firebase Phone Authentication

Firebase Authentication with phone number is configured and tested on iOS via Testflight but seems that is not working when Apple is reviewing the app.

We provided a whitelisted phone number which worked with the build downloaded from Testflight. I've found a couple of similar issues in GitHub but all was fixed... I'm using the latest version of Firebase auth plugin.

I added a GitHub issue as well but no reaction there: https://github.com/FirebaseExtended/flutterfire/issues/3800

Did somebody had to deal with this ?

Ad

Answer

Finally the app passed Apple review. Below is what we did, in case somebody will encounter this in the future:

  • We had two APN's created in Apple Developer account. The second one was configured in Firebase Console

     ===> we removed the first so now we have only one APN in Apple Dev account
    
  • In Firebase Console we had also certificates uploaded (Firebase states that those are not used if a .p8 key is uploaded)

     ===> we removed the unused APN certificate and used only the APN .p8 key.
    

Resubmitted the app to review and it passed.

Ad
source: stackoverflow.com
Ad