Google one tap sign in - Flutter Google One Tap Sign In (Android)

Overview

Screenshoot

Google One Tap Sign In

Google One Tap Sign In (Android)

A Flutter Plugin for Google One Tap Sign In

Getting Started

To access Google Sign-In, you'll need to make sure to register your application.

  • Add to your pubspec.yaml

    dependencies:  
      google_one_tap_sign_in: [any]
    
  • Add Google Service

    classpath 'com.google.gms:google-services:[x.x.x]'
    
  • Import plugin

    import 'package:google_one_tap_sign_in/google_one_tap_sign_in.dart';
    
  • Handle Simple Method

    // Your Web Client Id  
    final String _webClientId = "[XXXXXXXXXXX]";
    void _onSignIn() async {
        var data = await GoogleOneTapSignIn.startSignIn(webClientId: _webClientId);
        if (data != null) {
          // Whatever you do with [SignInResult] data
          print("Id Token : ${data.idToken ?? "-"}");
          print("ID : ${data.id ?? "-"}");
        }
    }
    
  • Handle with Condition Method

    // Your Web Client Id  
    final String _webClientId = "[XXXXXXXXXXX]";
    void _onSignInWithHandle() async {
    var result = await GoogleOneTapSignIn.handleSignIn(webClientId: _webClientId);
    
        if (result.isTemporaryBlock) {
          // TODO: Tell your users about this status
          print("Temporary BLOCK");
        }
    
        if (result.isCanceled) {
          // TODO: Tell your users about this status
          print("Canceled");
        }
    
        if (result.isFail) {
          // TODO: Tell your users about this status
        }
    
        if (result.isOk) {
          // TODO: Whatever you do with [SignInResult] data
          print("OK");
          print("Id Token : ${result.data?.idToken ?? "-"}");
          print("Email : ${result.data?.username ?? "-"}");
        }
    }
    

Example

Find the example wiring in the Google One Tap Sign In

You might also like...

A sign in button helper library for Flutter

A sign in button helper library for Flutter

A Flutter plugin for iOS and Android for generating signin buttons for different social media account. Feedback and Pull Requests are most welcome! In

Dec 29, 2022

A Flutter package for generating sign in buttons for different social media accounts.

A Flutter package for generating sign in buttons for different social media accounts.

Sign In Button A Flutter plugin for generating sign in buttons for different social media accounts. Getting Started You must add the library as a depe

Dec 8, 2022

This is an auction application just like eBay. Using firebase as the backend for signup & sign-in functionality. In addition to that, it's a two pages application with user bid in input and count down view.

This is an auction application just like eBay. Using firebase as the backend for signup & sign-in functionality.  In addition to that, it's a two pages application with user bid in input and count down view.

Nilam This is an auction application just like eBay. Using firebase as the backend for signup & sign-in functionality. In addition to that, it's a two

Nov 9, 2022

Flutter google maps - Flutter google maps Example

Flutter google maps - Flutter google maps Example

google_maps_example Development Setup Clone the repository and run the following

Oct 23, 2022

A Demo application📱 which stores User feedback from 💙Flutter application into Google Sheets🗎 using Google AppScript.

A Demo application📱  which stores User feedback from 💙Flutter application into Google Sheets🗎 using Google AppScript.

📱 Flutter 💙 to Google Sheets 📊 A Demo application which stores User feedback from Flutter application into Google Sheets using Google AppScript. Yo

Dec 28, 2022

Google mobile ads applovin - AppLovin mediation plugin for Google Mobile Ads (Flutter).

AppLovin mediation plugin for Google Mobile Ads Flutter Google Mobile Ads Flutter mediation plugin for AppLovin. Use this package as a library depende

Jul 5, 2022

A google browser clone which is made by using flutter and fetching the google search api for the search requests.

A google browser clone which is made by using flutter and fetching the google search api for the search requests.

google_clone A new Flutter project. Project Preview Getting Started This project is a starting point for a Flutter application. A few resources to get

May 31, 2022

Google-news-app-redesign - Redesigned the ui of google news app with flutter

Google-news-app-redesign - Redesigned the ui of google news app with flutter

News app like Google news! ScreenShots If you face any problem with this project

Jun 23, 2022

Google play scraper for flutter and dart created form JoMingyu/google-play-scraper

Google Play Store Scraper Dart and Flutter Google Play Store Scraper for flutter and dart helps you to get apks information from google play store. Im

Sep 14, 2022
Comments
  • Req Code: 14081996

    Req Code: 14081996

    Hi, I am deploying the package to my flutter project and I have the following message in the console. The general configuration has already been done.

    D/---DAEWU14---(10131): Req Code : 14081996 D/---DAEWU14---(10131): ~~~~ !! ONE TAP ApiException !! ~~~~

    opened by DevLuker 0
  • google_one_tap_sign_in.dart:4:8: Error: Not found: 'dart:ffi'

    google_one_tap_sign_in.dart:4:8: Error: Not found: 'dart:ffi'

    Package version: google_sign_in_web 0.10.1

    Problem: When I try to run my flutter web app, I get the following error:

    ../../flutter/.pub-cache/hosted/pub.dartlang.org/google_one_tap_sign_in-1.0.3/lib/google_one_tap_sign_in.dart:4:8: Error: Not found: 'dart:ffi'
    import 'dart:ffi';
           ^
    Waiting for connection from debug service on Chrome...            152.1s
    Failed to compile application.
    

    Even though pub.dev says the package doesn't support flutter web, it looks like from the package ChangeLog that flutter web has been supported since version 1.0.0 (because it supports web Client Ids).

    I tried running:

    • flutter clean
    • flutter packages get
    • flutter pub add ffi

    and none of the above worked.

    Any ideas/thoughts? Thanks in advance :)

    opened by ToddHerron 0
Owner
null
A note-taking app powered by Google services such as Google Sign In, Google Drive, and Firebase ML Vision.

Smart Notes A note-taking app powered by Google services such as Google Sign In, Google Drive, and Firebase ML Vision. This is an official entry to Fl

Cross Solutions 88 Oct 26, 2022
Simple face recognition authentication (Sign up + Sign in) written in Flutter using Tensorflow Lite and Firebase ML vision library.

FaceNetAuthentication Simple face recognition authentication (Sign up + Sign in) written in Flutter using Tensorflow Lite and Google ML Kit library. S

Marcos Carlomagno 279 Jan 9, 2023
6.SignIn SignUp-UI - SIGN IN And SIGN UP UI For Flutter

SIGN IN & SIGN UP UI Text Fields Box Shadow Gradient resizeToAvoidBottomInset Ri

Tukhtamurodov Sardorbek 3 May 16, 2022
"Login Demo" app which shows how to use google sign in Android and iOS using Flutter.

⚠️ ARCHIVED: This repository is using Flutter 1.7 for the sample app. You can find the latest version of the similar implementation on this new repo.

Souvik Biswas 195 Dec 2, 2022
Tap Hero Game - An Open Source Flutter Game

Tap Hero ?? ?? TapHero is a casual tapping arcade game. This repo includes Android, iOS, Desktop (macOS, Windows, Linux). For Flutter Web, check the T

Mariano Zorrilla 159 Dec 19, 2022
FLUTTER API: It's powerful navigation by gestures and taps. You can scroll from left to right or tap on the navigation icons.

scroll_navigation My other APIs Video Viewer Video Editor Helpers Features Fancy animations. Customizable colors. Works with the back button. Scrollin

Luis Felipe Murguia Ramos 14 Jun 14, 2022
Add an extra tap region to button widgets

ExtraTapRegion A widget to add an extra tap region around the child widget. Example @override Widget build(BuildContext context) { return DeferredPo

Yusuke Otsuka 0 May 17, 2022
Flutter package implements Sign Google redirect(working for incognito mode)

google_sign_in_web_redirect Flutter package implements Sign Google redirect(working for incognito mode). Usage Import the package dependencies: goog

null 2 Dec 15, 2022
One Dungeon is a ​1-Bit-style platformer game that consists of one level

One Dungeon is a ​1-Bit-style platformer game that consists of one level. It developed during the Midyear 2022 Flame Game Jam.

Bulent Baris Kilic 6 Sep 21, 2022
Call Kit is a prebuilt feature-rich call component, which enables you to build one-on-one and group voice/video calls into your app with only a few lines of code.

Call Kit (ZegoUIKitPrebuiltCall) Call Kit is a prebuilt feature-rich call component, which enables you to build one-on-one and group voice/video calls

ZEGOCLOUD 9 Dec 26, 2022