There have been many guides to get started with Google Sign using Firebase.
While this sample code will help you setup google_sign_in library without firebase.
-
Create a GCP project at https://console.cloud.google.com/projectcreate
-
Next go to https://developers.google.com/identity/sign-in/web/sign-in and select Configure Project, client as Android. Enter Package name and SHA1
-
Execute in terminal (assign a password and some other parameters)
keytool -genkey -v -keystore ~/key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias androiddebugkey
-
From the above step you will have a
key.jks
file for you. -
In
android/app/build.gradle
under android add these settings:signingConfigs { debug { storeFile file('key.jks') storePassword 'epynic' keyAlias 'androiddebugkey' keyPassword 'epynic' } } buildTypes { debug { signingConfig signingConfigs.debug } }
storeFile file('/home/epynic/key.jks')
- path to your key file generated in step 2storePassword 'epynic'
&keyPassword 'epynic'
the password used to generate the key in step 2. -
In termial execute
keytool -keystore key.jks -list -v
and in the output you’ll have the SHA-1 fingerprint. -
Find your package name at
AndroidManifest.xml
file, under thepackage=
attribute.