Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google sign in(OAuth) does not work when the apk is from Firebase App Distribution

I have built a simple Google Sign in for my application. However, when I deploy the apk using Firebase App Distribution, the process returns error code 10 when a user is trying to do google sign in on their device. I have checked to make sure that the firebase project has the same SHA-1 key as my application. I am also using github actions to deploy the apk(debug) to Firebase. I'm not really sure which code snippet to show here because I am following the Google Docs on integrating Sign in. This works on the emulator. You can let me know if there's any particular file I should add here for you to help better

like image 1000
Ivan Paul Avatar asked Oct 16 '25 23:10

Ivan Paul


2 Answers

In Credentials select your Android project. Your API key by default has name "Android key (auto created by Firebase)". Then click "Edit API key" and in field "API restrictions" select "Don't restrict key" and click "Save". Now Google Sign in (OAuth) should works properly also when the apk is from Firebase App Distribution.

like image 96
makary Avatar answered Oct 18 '25 14:10

makary


In case of AAB:

  1. Open Firebase console -> Your project -> (All products) -> App Distribution
  2. On "Releases" tab press "View certificate" button
  3. Copy SHA-1 fingerprint
  4. Go to Project settings
  5. For Android app add copied SHA-1 fingerprint

App distribution generates a new test certificate after your first AAB upload, so you should add it for your application.

like image 35
Mol0ko Avatar answered Oct 18 '25 15:10

Mol0ko



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!