Check Mobile App
Read now
Start a Project

Google Sign In Flutter

Save

Nowadays in most of the mobile app, it required login. And to log in, we need to signup first, filling the long-form. But we can log in to the app through a Social account, then we don’t need to fill a long form to register into the app. Google Sign in Flutter is one of the ways to log in.

In today’s blog, we will see how we can implement Google Sign in Flutter.

Android Integration:

Step1: Register your android application in Firebase from the link.

Step2: Enable the OAuth APIs that you want, using the Google Cloud Platform API manager.

Note: Please fill all required fields in the console for OAuth consent screen. Else you might get APIException errors.

iOS Integration:

Step1: Register your iOS application in Firebase from the link.

Step2: Download GoogleService-Info.plist file, and add in Runner target.

Step3: Add below code in [my_project]/ios/Runner/Info.plist file.

Flutter Code:

Step1: Add below code in package’s pubspec.yaml and run pub get.

Step2: Import the package in your dart code.

Step3: Initialize the GoogleSignIn.

Step4: Use the following code to authenticate in your Dart code.

Please check below the complete code for main.dart file.

Finally run your code and check the result.

Thanks for reading 🙂

For more interesting blogs check out here – https://mobikul.com/blog/

. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


Be the first to comment.

css.php

Very good company, we did get app extension for Magento 2 website. The support was very good they help us through the process. Webkul team is very supportive, I would recommend them.

Yasser Mohamed

Yasser Mohamed

Talk to Sales

Global

Live Chat
Start a Project

    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home