2

I've been following this to implement google sign in in my app. I've followed every step, set my SHA1 and web cliednt id in firebase and the app.

What happens: I click the button to sign in with Google The google prompt appears I select the account The propmt closes.

I've put some toasts here and there to see where the code gets stucks and

  @Override
    public void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

        // Result returned 

from launching the Intent from GoogleSignInApi.getSignInIntent(...);
    if (requestCode == GOOGLE_SIGN) {
        Task<GoogleSignInAccount> task = GoogleSignIn.getSignedInAccountFromIntent(data);
        try {
            // Google Sign In was successful, authenticate with Firebase
            GoogleSignInAccount account = task.getResult(ApiException.class);
            firebaseAuthWithGoogle(account);
        } catch (ApiException e) {
            alert("You suck even more"); <---THIS ONE
            // Google Sign In failed, update UI appropriately
            // ...
        }
    }
}

That toast in the catch (ApiException e) is displayed. Why is it stuck on the onActivityResult?

Here is the gradle:

 dependencies {
implementation 'com.google.firebase:firebase-core:17.0.0'
    implementation 'com.google.firebase:firebase-auth:17.0.0'
    implementation 'com.google.firebase:firebase-storage:17.0.0'
    implementation 'com.firebaseui:firebase-ui-storage:4.1.0'
    implementation 'com.firebaseui:firebase-ui-database:4.1.0'
    implementation 'com.google.android.gms:play-services-auth:15.0.1'


}

apply plugin: 'com.google.gms.google-services'

Or at least the google relevant ones.

I've followed everything regarding this aPI EXCEPTION, YET NOTHING HELPS. Hell, I even deleted the whole Firebase project out of frustration and created it new and did this... Yet nothing... I can't even do that 'cause I can't put the same SHA1 in Google Dev and Firebase, I'm prompted with a d uplicate Please, it must be way easier than this, I think I'm just overthinking this by now

Please help me, it's like 5 hours I'm looking through github issues.

BetaReogen
  • 69
  • 6

1 Answers1

0

Have you added your support email address . Because this is the common we use to do while setting up the firebase . Without support email address we can get the desired reult from firebase

Mini Chip
  • 949
  • 10
  • 12