robingenz / capacitor-firebase-authentication-demo

⚡️ Simple Ionic Angular app to demonstrate the use of the Capacitor Firebase Authentication plugin.
MIT License
27 stars 13 forks source link

bug: [Capacitor] [IOS] Cannot request OTP when use FirebaseAuthentication.signInWithPhoneNumber #226

Closed meawiey closed 1 year ago

meawiey commented 1 year ago

Describe the bug I found error "[error] - SMS not sent {"code":"auth/internal-error","customData":{},"name":"FirebaseError"}" when use ionic capacitor firebase in platform IOS

Setup Project & Reproduce

  1. Add package https://github.com/firebase/firebase-ios-sdk.git in x code

    image
  2. initializeApp(firebaseConfig); in app.component.ts

  3. signInAnonymously() in app.component.ts success and receive token firebase

  4. Request OTP and found error "[error] - SMS not sent {"code":"auth/internal-error","customData":{},"name":"FirebaseError"}"

Expected behavior Can use signInWithPhoneNumber and verify OTP

Screenshots

image

Smartphone (please complete the following information):

Additional context git repo :> https://github.com/meawiey/capacitor_firebase

robingenz commented 1 year ago

You should not add the Firebase swift package manually. The Firebase SDK is already installed.

meawiey commented 1 year ago

I already remove package firebase

image

after I build and request otp I found new error "[error] - SMS not sent {"code":"auth/internal-error","customData":{},"name":"FirebaseError"}"

image
robingenz commented 1 year ago

I have just noticed that this issue is not about this project but occurs in your own app. For this reason, I am closing this issue. Unfortunately, I have no idea what the error is. The error message itself is not very descriptive. Make sure that the phone number is formatted correctly. In addition, I would use a fictitious phone number for testing to narrow down the problem (see https://firebase.google.com/docs/auth/android/phone-auth#test-with-fictional-phone-numbers).