•  


[firebase_auth] Firebase SMS Authentication Error Code 39 · Issue #5815 · firebase/firebase-android-sdk · GitHub
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement . We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[firebase_auth] Firebase SMS Authentication Error Code 39 #5815

Open
mmd44 opened this issue Mar 28, 2024 · 3 comments
Open

[firebase_auth] Firebase SMS Authentication Error Code 39 #5815

mmd44 opened this issue Mar 28, 2024 · 3 comments

Comments

@mmd44
Copy link

mmd44 commented Mar 28, 2024

Versions

  • Android Studio version: Jellyfish | 2023.3.2 Canary 1
  • Firebase Component: firebase-auth
  • Component version: BOM: 32.8.0

Description

I am facing a weird issue with firebase sms auth in Android and Jetpack compose.

I am trying to test reCAPTCHA flow when Play Integrity Check is not available on REAL NUMBERS (when testing with fictional numbers, everything works fine).

I have an app that is not yet on the store, so assuming Play Integrity API will fail and firebase auth sdk will try to validate my app through ReCaptcha as stated in docs.

I have already setup the following:

  • Enabled reCAPTCHA Entreprise on Google console
  • Added debug and release signing keys SHA1 and SHA256 to the firebase console
  • No country restriction is on firebase console
  • API Key on google console is not constrained
  • My app domain name (xxxxxx.firebaseapp.com) is added to firebase's authorized domains
  • Tested on both release and debug versions of my app but got same result

Steps to reproduce:

The weird behavior is as following:

I have 2 real phone numbers one with country code +1 (CAD) and the other +961 (LB) (both are listed as supported countries);

1. When I test with +1 XXX XXX XXXX :

I successfully receive the code while noticing the following errors in logs :

  • [SmsRetrieverHelper] SMS verification code request failed: unknown status code: 18002 Invalid PlayIntegrity token; app not Recognized by Play Store.
  • Failed to initialize reCAPTCHA config: No Recaptcha Enterprise siteKey configured for tenant/project *

2. When I test with +961 XX XXXXXX :

I fail to receive the code, get the same errors in logs as above + a failure message :

  • [SmsRetrieverHelper] SMS verification code request failed: unknown status code: 17499 Error code:39

In both test cases, the app successfully opens the browser (a screen with 'verifying you're not a robot' label text and loading) and redirects back to my app, so I am assuming the reCAPTCHA is working...

I have also tried to add the recaptcha sdk and linking it to a key added on Google console and initialize it on my app but I also failed to get any different result.

Any idea what could be the issue?

@google-oss-bot
Copy link
Contributor

I found a few problems with this issue:

  • I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
  • This issue does not seem to follow the issue template. Make sure you provide all the required information.

@Xiaoshouzi-gh
Copy link

We use recaptcha V2 instead of Entreprise internally with phone auth, can you reproduce both cases after you Disable reCAPTCHA Entreprise on Google console?

@mmd44
Copy link
Author

Yes same results.
It seems reCAPTCHA Enterprise is not being used even when enabled as no requests are being registered on this API on Google console's enabled APIs page.

Sign up for free to join this conversation on GitHub . Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants
- "漢字路" 한글한자자동변환 서비스는 교육부 고전문헌국역지원사업의 지원으로 구축되었습니다.
- "漢字路" 한글한자자동변환 서비스는 전통문화연구회 "울산대학교한국어처리연구실 옥철영(IT융합전공)교수팀"에서 개발한 한글한자자동변환기를 바탕하여 지속적으로 공동 연구 개발하고 있는 서비스입니다.
- 현재 고유명사(인명, 지명등)을 비롯한 여러 변환오류가 있으며 이를 해결하고자 많은 연구 개발을 진행하고자 하고 있습니다. 이를 인지하시고 다른 곳에서 인용시 한자 변환 결과를 한번 더 검토하시고 사용해 주시기 바랍니다.
- 변환오류 및 건의,문의사항은 juntong@juntong.or.kr로 메일로 보내주시면 감사하겠습니다. .
Copyright ⓒ 2020 By '전통문화연구회(傳統文化硏究會)' All Rights reserved.
 한국   대만   중국   일본