title: Google sign-in is failing in my Flutter app
body: <p>I'm getting the following error message in the console</p>
  
  <pre><code>I/flutter (14118): PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 10: , null)
  </code></pre>
  
  <p>and google sign in is failing.</p>
  
  <p>The Google sign-in was working before. I don't know exactly what changed but it broke today and I'm completely unsure what could have caused it. I'm not sure if it was me setting my android sdk in my project structure in Intellij IDEA (because I migrated from Android Studio), that I moved my google sign in code to another dart file, or something else.</p>
  
  <p>I've already set both my SHA-1 and SHA-256 keys and double/triple checked them, regenerated my keystore and checked again. But it definitely is not the problem despite what all the other threads have said.</p>
  
  <p><img src="https://i.imgur.com/Ekkti6Z.png" alt=""></p>
  
  <p>I've also fully set up my Google O-Auth concent screen in my credentials panel under the correct project. Added my support email, set the name, added a logo, and added the firebase.com sites under the respective fields.</p>
  
  <p><img src="https://i.imgur.com/PlUjg3u.png" alt=""></p>
  
  <p><img src="https://i.imgur.com/DOJZKnh.png" alt=""></p>
  
  <p>And already set my support email in my firebase project</p>
  
  <p><img src="https://i.imgur.com/ppxSkEW.png" alt=""></p>
  
  <p>And tried to run <code>flutter clean</code> several times throughout my efforts.</p>
  
  <pre class="lang-dart prettyprint-override"><code>import 'dart:async';
  import 'dart:io';
  
  import 'package:cloud_firestore/cloud_firestore.dart';
  import 'package:firebase_auth/firebase_auth.dart';
  import 'package:flutter/cupertino.dart';
  import 'package:flutter/material.dart';
  import 'package:google_sign_in/google_sign_in.dart';
  import 'package:image_picker/image_picker.dart';
  import 'package:rotaract/logic/cloud_functions.dart';
  import 'package:rotaract/main.dart';
  import 'package:firebase_storage/firebase_storage.dart';
  import 'package:photo_view/photo_view.dart';
  import 'package:rotaract/ui/clubdecision/join_club.dart';
  import 'package:rotaract/ui/clubdecision/register_club.dart';
  import 'package:rotaract/ui/photo_view.dart';
  
  class ClubDecision extends StatefulWidget {
    final FirebaseAuth _auth = FirebaseAuth.instance;
    final GoogleSignIn _googleSignIn = GoogleSignIn();
  
    @override
    State&lt;StatefulWidget&gt; createState() =&gt; ClubDecisionState();
  }
  
  class ClubDecisionState extends State&lt;ClubDecision&gt; {
    StreamSubscription&lt;FirebaseUser&gt; _listener;
    FirebaseUser _currentUser;
  
    bool errored = false;
  
    @override
    void initState() {
      super.initState();
      _checkCurrentUser().then((v) {
        if (_currentUser == null) {
          _handleGoogleSignIn().then((FirebaseUser user) {
            print(user.email);
            errored = false;
          }).catchError((e) {
            print(e);
            setState(() {
              errored = true;
            });
          });
        }
      }).catchError((e) {
        print(e);
        setState(() {
          errored = true;
        });
      });
    }
  
    Future&lt;FirebaseUser&gt; _handleGoogleSignIn() async {
      final GoogleSignInAccount googleUser = await widget._googleSignIn.signIn();
      final GoogleSignInAuthentication googleAuth = await googleUser.authentication;
  
      final AuthCredential credential = GoogleAuthProvider.getCredential(
        accessToken: googleAuth.accessToken,
        idToken: googleAuth.idToken,
      );
  
      final FirebaseUser user = (await widget._auth.signInWithCredential(credential)).user;
      assert(user.email != null);
      assert(user.displayName != null);
      assert(!user.isAnonymous);
      assert(await user.getIdToken() != null);
  
      final FirebaseUser currentUser = await widget._auth.currentUser();
      assert(user.uid == currentUser.uid);
      setState(() {
        _currentUser = user;
      });
      return user;
    }
  
    Future&lt;void&gt; _checkCurrentUser() async {
      return widget._auth.currentUser().then((user) {
        _currentUser = user;
        _currentUser?.getIdToken(refresh: true);
  
        _listener = widget._auth.onAuthStateChanged.listen((FirebaseUser user) {
          setState(() {
            _currentUser = user;
          });
        });
      });
    }
  
    @override
    void dispose() {
      _listener.cancel();
      super.dispose();
    }
  
    @override
    Widget build(BuildContext context) {
      return _currentUser == null
          ? Scaffold(
              body: Center(
                child: Column(mainAxisAlignment: MainAxisAlignment.center, children: &lt;Widget&gt;[
                  SizedBox(
                    width: 200,
                    child: RaisedButton(
                      color: Color(0xFFeeeeee),
                      onPressed: () {
                        setState(() {
                          errored = false;
  
                          _checkCurrentUser();
  
                          if (_currentUser == null) {
                            _handleGoogleSignIn().then((FirebaseUser user) {
                              print(user.email);
                              errored = false;
                            }).catchError((e) {
                              print(e);
                              errored = true;
                            });
                          }
                        });
                      },
                      child: Row(
                        mainAxisAlignment: MainAxisAlignment.start,
                        children: &lt;Widget&gt;[
                          Image.asset(
                            'assets/g_logo_500.png',
                            width: 24,
                          ),
                          Padding(padding: EdgeInsets.only(right: 10)),
                          Text(
                            "Login using Google",
                            textAlign: TextAlign.left,
                            style: TextStyle(
                                color: Theme.of(context).accentColor,
                                fontSize: 15,
                                fontFamily: "Pacifico"),
                          ),
                        ],
                      ),
                    ),
                  ),
                  Text(
                    !errored ? "Logging you in..." : "Couldn't sign you in. Try again.",
                    style: TextStyle(color: Theme.of(context).accentColor),
                  )
                ]),
              ),
            )
  ...
  </code></pre>
  
  <p>It used to work fine just yesterday. But I'm unsure how it broke today... It no longer works neither on my Nexus 5 emulator, nor my Samsung Galaxy S9 via USB debugging.</p>
  
  <p>I'm not sure what to do anymore...</p>