Skip to content Skip to sidebar Skip to footer

Error While Doing Phone Authentication On Firebase

While doing phone number authentication on firebase i'm getting crash with this error message. please help. com.russvkm.chathut is my package name E/AndroidRuntime: FATAL EXCEPTI

Solution 1:

Firebase auth got some major changes, like Recaptcha for human verification.it needs a browser to verify so, Add the below depen. and read about changes refer me

    implementation 'androidx.browser:browser:1.2.0'

Update : If you want to avoid human verification, you need to enable safetynet in google cloud console for your firebase project refer this.

Solution 2:

By adding

implementation "androidx.browser:browser:1.3.0"

it solved my problem but user experience was not good because firebase was opening browser to verify Recaptcha and that was looking odd in app flow.

Firebase Quote "The reCAPTCHA flow will only be triggered when SafetyNet is unavailable or your device does not pass suspicion checks. Nonetheless, you should ensure that both scenarios are working correctly."

So to enable SafetyNet follow below steps or you can also visit Firebase Auth for more info.

1.Go to google cloud console , select your project .

2.Click on navigation menu and select APis & services and then select Dashboard.

3.Click on enable api and services and enable api " Android Device Verification".

4.Add SHA 256 in firebase project settings. (debug and release both)

5.Test your app again.(For testing use real device not emulator)

Post a Comment for "Error While Doing Phone Authentication On Firebase"