Firebase is not sending OTP to the Mobile Number

Web Technologies Web Development 2 years ago

0 1 0 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating
_x000D_ _x000D_ I am facing something different type of problem. I am using Firebase Mobile number authentication in my App. When I am trying to send OTP to the same mobile number that I am using, the OTP is not sending. However, if I am sending OTP to the other mobiles from my mobile OTP is sending. I also found If I send OTP from another mobile to my number OTP is coming. Hence there is no issue of Mobile Number. On Debugging I found that this code block is not working @Override public void onCodeSent(String verificationId, PhoneAuthProvider.ForceResendingToken forceResendingToken) { super.onCodeSent(verificationId, forceResendingToken); Log.e(TAG, "onCodeSent: s - " + verificationId + " : t - " + forceResendingToken); xVerificationId = verificationId; } For other numbers, it is working and verification and forceResendingToken are generating.

Posted on 16 Aug 2022, this text provides information on Web Development related to Web Technologies. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Answers (1)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 2 years ago
_x000D_ Are you implementing onVerificationCompleted? In the following 2 cases, no OTP is sent, as explained in https://firebase.google.com/docs/auth/android/phone-auth: Instant verification: phone number can be instantly verified without the need to send an OTP. Auto-retrieval: Google Play Services can automatically detect the OTP without any user action. In this case, you will directly get back a PhoneAuthCredential.

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.

Important Web Technologies Links