DEV Community

Cover image for React Native: Google Login error in release build
Sudin Sth
Sudin Sth

Posted on

React Native: Google Login error in release build

You have created a proper app and build the apk for the app. The problem arises when the the app doesn't let the user sign-in from Google from the device.

However, it works from the simulator. So, what's the problem. Assuming the setup was from the firebase. The problem might be that the firebase project is missing the SHA-1 key from your project.

Solution:
You need to add your SHA-1 key to the firebase project. You can get the SHA-1 key by running the code:
keytool -list -v -keystore {keystore file name} -alias {alias name}

SHA-1 key screenshot example from console of vscode.

Copy the SHA-1 key and Add it in the Project Settings of your Firebase Project.
Firebase project settings for adding SHA-1 key fingerprint.

Summary:
After adding the SHA-1 key to the firebase project. Users should be able to sign-in from the device. No need to rebuild the apk.

Top comments (0)