We have Phone Verification working without any issue in Android. Tried integrating with FirebaseUI for iOS and was getting error with phone verification "Invalid Token - FIRAuth Error Domain Code 17048" ( Other verifications are working correctly )
Followed instruction from this link https://firebase.google.com/docs/auth/ios/firebaseui
If we delete APN's Authentication key and upload APNs Certificates ( prod and dev ) phone verification is done without any issue
Phone Verification fails with error Invalid Token - FIRAuth Error Domain Code 17048
If we delete APN's Authentication key and upload APNs Certificates ( prod and dev ) phone verification is done without any issue
allos phone verification
// TODO(you): code here to reproduce the problem
That's this error, indicating your client has an invalid APNS token.
@morganchen12 - Thanks for your reply. When we remove APN's Authentication key and upload APNs certificates - Phone verfication starts working in production as well as in development without any ios code change. Can you please tell us what change is required on ios side to make it working with APN's Authentication key? I have followed the instructions provided on developer.google.com
Make sure your Auth key belongs to the same Team ID as the one used to sign your application. For most teams this is the same as the App ID Prefix, but for others it may not be.
yes I veritify its same Team ID as signing ID
To check if it's an auth key issue, are you able to send notifications directly through APNs with the auth key? This link may be helpful.
Thanks we will test and share result.
@RachitTechnology is this still an issue?
Got it working with APNs certificates but never got chance to test with your solution for APN's Authentication key. Will close this for now
I Guess found the problem
After Uploading APNs auth key (.p8 file), Team ID in general settings was wrong. After setting right Team ID in general settings fixed the issue for me.
I know this issue is closed, but one thing to check is whether you uploaded the .p8 Auth key to firebase at all. That was my problem. I duplicated an app to make a new one and forgot to upload the .p8 key. It's in the firebase project - click the gear, then Project Settings, then upload it under APNS App configuration. More details here: https://firebase.google.com/docs/auth/ios/phone-auth
Most helpful comment
Make sure your Auth key belongs to the same Team ID as the one used to sign your application. For most teams this is the same as the App ID Prefix, but for others it may not be.