Flutter Google Sign in with Firebase Auth.
In this article, we are trying to achieve google sign in with firebase auth in a few steps.
First, we have to import Some dependencies.
I am using the following version of google sign in and firebase auth.
Then write a classpath in your android level build.gradle file
after that import gms plugin in your app-level build.gradle
Hurray….!!!
The android side implementation is complete now come to Firebase console.
Create a firebase project and add an android application in your project.
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.
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.
Hurray..!!! we completed the google sign in.
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.