0

When I'm installing app from android studio everything works correctly, but when I generate apk and install app on my device and verify my mobile number using Firebase OTP shows error:

This app is not authorized to use Firebase authentication please verify that the correct package name and sha-1 are configured in the Firebase console

theduck
  • 2,589
  • 13
  • 17
  • 23

2 Answers2

0

Ensure you include SHA-1 key in your firebase console configuration for phone auth. To get a key,check out this solution..https://stackoverflow.com/a/34223470/5985401. Copy the key and paste in your app's configuration on firebase console.

simon
  • 126
  • 8
0

Seems you have not added SHA-1 fingerprint of signed app which is different from debug app . Follow the below procedure to add SHA-1

-> Open your Firebase Console .

-> Click on the gear icon near Project Overview .

-> In General tab move down to Your Apps

-> You will see Add Fingerprint button there

You can generate SHA1 for released/signed app using the command below :

keytool -list -v -keystore {keystore_name} -alias {alias_name}

Example :

keytool -list -v -keystore PATH_TO_YOUR_JKS_FILE(C:\Users\PC\Desktop\test.jks) -alias YOUR_KEY_ALIAS_NAME(test)

xaif
  • 553
  • 6
  • 27