Google Sign-In
This section will explain how to set up Google Sign-In in a project
To enable the Google Sign-In feature, you first need to go to https://console.cloud.google.com/welcome and register your project

In the new window, click on the "New Project" button

Then, enter the name of your project

After creating the project, go to the project settings

Go to settings "OAuth consent screen" to create OAuth

Select the External item and click on the "CREATE" button

Then you need to fill in all the required information for the project

Then click on the button at the bottom of the page. "SAVE AND CONTINUE"

Once you have filled everything in, you will have a project created, it will be in "Testing" mode, you will need to test the Google login, but in order to test, you will need to add a test user to start.


Next step: You need to create "Credentials", go to "Credentials" tab

Click on the button "CREATE CREDENTIALS"

Then select "OAuth client ID", and select Android/IOS type


Package name: Your application ID, you can find it in the AndroidManifest.xml file

To get the SHA-1 certificate fingerprint, you need to go to the project, open a terminal, and open the android folder through the terminal

Then, you need to enter this command
./gradlew signingReport

Then in your terminal, the signingReport key will appear, select the very first "debug"


You can find the Bundle ID in AppStoreConnect, on the "Application Information" tab
After creating an OAuth Client ID, you can set up a project in Android Studio

Android Client ID

IOS Client ID and IOS URL scheme
You need to open Android Studio, go to the project, and find the file "google_signin.dart" (lib -> data -> shared_components -> google_signing.dart), and change line 7, replace with your Android Client ID

If you have a project in Firebase then you need to find the file Info.plist (ios -> Runner -> Info.plist)

You need to replace with your IOS Client ID (Reverse Client ID or IOS URL Scheme)
Then you need to replace the GOOGLE_CLIENT_ID_IOS variable in the google_signing.dart file
