Google Login:
If you haven’t Firebase Project Account ? Click here for create project see the steps show in Firebase Setup.
Follow below steps for Google Login in your project:
- Go to Firebase https://firebase.google.com/.
- Now click on Get Started button
- Now select your project if created or create your project by click on + Add Project and
google-services.json
NOTE : How to create Project and set google-services.json setup show in above Firebase Setup
-
On left hand side panel click on setting icon. On click Setting
button pop open open.
In that click on Project Settings
- Scroll down click on your package and add SHA-1 and SHA26 Key for debug and release.
NOTE : How to generate SHA-1 and SHA26 steps are mention above. You can see in document left hand menu panel and click on Firebase SHA Key
- In Firebase on left hand panel click on Authentication and click on Get
started
- In Authentication, click Sign-in-method and in thar click on Add new
provider.
- Now click on Google button for add provider.
- Now Enable the toggle give support email and click on Save> button.
- After complete above steps and after adding SHA key now open google_sign_in plugin link.
- Copy the plugin with latest version and paste it in your project -> pubspec.yaml
- Copy below command, go to project in Android Studio or Visual Studio -> open terminal
and paste command and enter it.
flutter pub get - Remeber to add all the dependencies in build.gradle which mention in above Firebase Setup
NOTE : Remeber to add SHA-1 and SHA26 key for debug and release after that only test google login - Now delete your app from your device (from your phone) and the run app again and try to do Google Login.