Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter: generate release SHA1 fingerprint

I have finished my application with flutter, but in release mode, firebase auth is not working. I've been told that I must generate a SHA1 for the release mode, but I don't know how. It works in debug mode, but not in release mode. How can I generate it, or do we have another solution?

like image 603
Pondikpa Tchabao Avatar asked Dec 05 '18 10:12

Pondikpa Tchabao


2 Answers

You need to access the application in Play Store. In the section Release Management > App signing you can get the SHA1. Copy, put in the Firebase configuration, download the google-services.json and put in your app folder.

enter image description here

like image 190
Ascension Avatar answered Sep 28 '22 09:09

Ascension


I know this is a very old question, but I am leaving this here for anyone else who wanders by.

My app also would not authenticate while running in release mode. After hours of trying various things. I found my solution:

Using the steps listed here: https://stackoverflow.com/a/34223470/10575896

  1. Open Android Studio
  2. Open your Project
  3. Click on Gradle (From Right Side Panel, you will see Gradle Bar)
  4. Click on Refresh (Click on Refresh from Gradle Bar, you will see List Gradle scripts of your Project)
  5. Click on Your Project (Your Project Name form List (root))
  6. Click on Tasks
  7. Click on Android
  8. Double Click on signingReport (You will get SHA1 and MD5 in Run Bar(Sometimes it will be in Gradle Console))

The console will print out the SHA keys for both debug and release. I had added the debug keys to firebase, but i had not added the release keys.

I simply added the SHA1 and SHA256 keys to firebase, and I was good to go.

like image 35
Airborne Eagle Avatar answered Sep 28 '22 07:09

Airborne Eagle