Flutter Google Sign in with Firebase Auth.

Osama Asif
3 min readJul 20, 2020

In this article, we are trying to achieve google sign in with firebase auth in a few steps.

after that import gms plugin in your app-level build.gradle

also imports the implementation of firebase analytics in your app-level build. Gradle dependencies.

Hurray….!!!

The android side implementation is complete now come to Firebase console.

Create a firebase project and add an android application in your project.

Go to your manifest and copy the package name and paste here.

keytool -list -v -keystore “Your debug keystorepath here like this e.g: -C:\Users\User\.android\debug.keystore” -alias androiddebugkey -storepass android -keypass android

for signing certificate run the above command in your terminal and paste singing certificate SHA-1 in the place of Debug signing certificate.

download the Json file and place it in your android -> app folder

We already completed this part.

Now comes to the dart code.

Import firebase auth and google signin in your file.

In the above function, we are taking the authentication and retrieving user credentials.

Now, call this function in your UI event.

So this is our final step.

Hurray..!!! we completed the google sign in.

A very simple UI for better understanding.

You can see your user in google authentication.

Complete code is here….

Hope you guys Like it, show some love guys and do subscribe to my YouTube channel Thank You.

--

--

Osama Asif

Seasoned software engineer with over 6 years of extensive industry experience specializing in the development of mobile applications.