Google-signin: Google sign in did'nt work in release APK

Created on 30 Mar 2018  ·  7Comments  ·  Source: react-native-google-signin/google-signin

Hi guys,

As per title, i can only login and enter landing page in debug mode.

But when i tried in in release APK. It didn't work.

Need some help.

All 7 comments

oh god be careful for add certificate fingerprints SHA, add 2 version certificate apk release and debug, because android have different certificate between release and debug.

Yesterday same problem occurred to me.

Google has released a new signing service in playstore publish console in which google will signin your app with his keystore. After signing , it will give you a new SHA which you have to add in your firebase account.

fixed error

Делюсь решением проблемы авторизации через Google-Sign-In в релизной версии проекта. Необходимо сделать следующие шаги:

Чтобы получить релизный код SHA-1 требуется:

  1. Найти на диске служебную программу «keystore».
    На моём компьютере она находится - C:\Program Files\Java\jdk1.8.0_201bin.
  2. На свободном поле в папке, в которой находится файл «keystore»,
    нажать шифт и правую кнопку мыши. В контекстном меню выбрать:
    «Открыть окно PowerShell здесь».
  3. Откроется окно PowerShell.
  4. Вначале будет запись: PS C:\Program Files\Java\jdk1.8.0_201bin>
  5. найти расположение файла-ключа, созданного для данного проекта в
    Андроид Студии. Например - C:\Users\Desktop\key_1.jks.
  6. в конце строки, с соблюдением всех пробелов, вставить:
    .\keytool -exportcert -keystore "C:\Users\Desktop\key_1.jks" -list -v
  7. появится запрос на пароль от файла-ключа: Enter keystore password:
  8. нажать Enter
  9. или ввести пароль, который мы определили при создании файла-ключа
    в Студии.
  10. Enter
  11. появится информация с кодами:

Certificate fingerprints:
MD5: 14:84:
SHA1: BA::2E:*
SHA256:
88::32:91*


  1. скопировать код SHA1:
  2. в консоли GoogleDeveloper (https://console.developers.google.com/)
    нажать на кнопку «Создать учётные данные».
  3. Выбрать «Идентификатор клиента OAuth
  4. выбрать Android
  5. откроется бланк заполнения.
  6. Придумать название клиента.
  7. Вставить ключ SHA-1, полученный выше в окне PowerShell.
  8. Вставить пакет, скопированный в Студии (находится вначале каждого
    джава-файла или в манифесте).
  9. «Создать».
  10. Создастся новый релизный ключ.
  11. После этого можно создавать в Студии релизную версию проекта и
    запускать его отдельно от Студии или выкладывать в Маркет.
  12. Авторизация проходит и сохраняется на устройстве.
  13. Предполагаю, что для авторизации через Firebase потребуются
    дальнейшие шаги:
  14. этот же код надо будет вставить в консоли Firebase:
  15. выбираем проект
  16. наверху «Project Overview»/(шестерёнка)/Настройки проекта
  17. Крутим вниз
  18. «Добавить контрольную сумму»
  19. вставить SHA-1 и SHA-256

Yesterday same problem occurred to me.

Google has released a new signing service in playstore publish console in which google will signin your app with his keystore. After signing , it will give you a new SHA which you have to add in your firebase account.

fixed error

What if my app is not on playstore, how can I get the release SHA for using google sign in?

I found the solution.
1-First of all change the build variant to the release mode, from right bottom side of android studio.
2-When ever you create a release version, a JKS file would also be created, which you have put a password for
3-open that JKS file and get your release mode SHA.
4-go to firebase console and in the project setting change the SHA to the one which is in JKS file.

I hope that it helps

how can I get the release SHA for using google sign in?

how can I get the release SHA for using google sign

1-First of all change the build variant to the release mode, from right bottom side of android studio.
2-When ever you create a release version, a JKS file would also be created, which you have put a password for
3-open that JKS file and get your release mode SHA.
4-go to firebase console and in the project setting change the SHA to the one which is in JKS file.

I hope that it helps

Was this page helpful?
0 / 5 - 0 ratings