Firebase Phone OTP/ SHA1
Last updated
Last updated
Click on authentication
Click on Sign-in method tab
click on phone then enable it
on the sign-in method tab, scroll to the Authorized domains
Add your backend domain. This is so firebase can allow request from your server.
Android has added SafetyNet you can read more here. For OTP to work you need to do the following:
enable the Android Device verification api on the google cloud console. Follow the link here to enable it.
If you haven't yet specified your app's SHA-256 fingerprint, do so from the Settings Page of the Firebase console. For more info read details here.
You need to configure firebase phone auth for phone otp verification to work, without this you would running into errors building the app.
To solve this error, you need to add both your keystore SHA1 and SHA56 as well as debug SHA1 and SHA256 to fireabse console.
That means two SHA1 and two SHA256
For debug keys use https://developers.google.com/android/guides/client-auth?authuser=1 to get the key, use ./gradlew signingReport
or .\gradlew signingReport
if in windows to get debug keys.
For release keys use Keystore explorer to see the SHA1 and SHA256.
If the issue persists after changing your SHA1 and SHA256 make sure the following:
Change the google-services.json file again.
Delete the app in settings and add a new one with the right SHA1