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.
firebase_auth | Flutter Package
Add this to your package’s pubspec.yaml file: dependencies: firebase_auth: ^0.16.1 You can install packages from the…
google_sign_in | Flutter Package
Add this to your package’s pubspec.YAML file: dependencies: google_sign_in: ^4.5.1 You can install packages from the…
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
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.
Flutter Circle Avatar and ListView.builder()
how to create a list of circle avatar with a border?
Material Page Route and Named Route in Flutter.
So let’s start with the basic code of splash screen where I am only using Image and circular progress indicator.