3

I have implemented everything I needed to implement to use Google Sign In (at least I think I have).

I have my Google Sign In button, I can click it, it prompts me to select an account but I always get error 12500 (Login Failed).

I've been looking around for a solution to this issue and have heard a lot about SHA-1 and Firebase. Not sure what Firebase is, nor is it mentioned in any of the following documentation:

https://developers.google.com/identity/sign-in/android/sign-in

https://developers.google.com/identity/sign-in/android/start-integrating

Do I absolutely need Firebase to get Google Sign In to work? If so, what do I have to do? If not, what else could be causing my 12500 error?

PaulG
  • 6,920
  • 12
  • 54
  • 98
  • @TheWanderer Not really a duplicate, different question. – PaulG Oct 24 '18 at 20:11
  • 1
    Firebase makes oAuth a bit easier to add to an app. There are other services that do the same like Auth0 https://auth0.com/docs/libraries/auth0-android – denixtry Oct 24 '18 at 20:17
  • It is a duplicate. This is an XY problem. You're asking about a new issue that arose trying to solve your original issue. Solve your original one, and this question likey becomes no repro. – TheWanderer Oct 24 '18 at 20:18
  • @Wanderer Got it, thanks! – PaulG Oct 24 '18 at 20:19

2 Answers2

2

Definitely, you can implement Google sign in without using Firebase. You can check the Google sign in implementation here (without Firebase) in my first commit to this project. Look for file JNLoginActivity.java :-

https://github.com/swapniljain23/Jinshashan/commit/d7808bb1a109f0827fe4bbce2a58bbd96d210467

I hope, it helps!!

Swapnil Jain
  • 551
  • 1
  • 6
  • 9
  • Thanks a lot! My code looks very similar to your code in `JNLoginActivity.java`, except in my GoogleSignInOptions I add my `.requestIdToken`. Always getting error 12500 though. – PaulG Oct 25 '18 at 13:50
1

To answer your question: no, you do not need firebase to get google login to work for your application. Firebase is a popular no-sql backend for mobile apps that happens to fully integrate google oauth2, but you should be able to to do it without firebase.

As TheWanderer suggested, check out this post

TheCog19
  • 1,129
  • 12
  • 26
  • Thanks! I've seen that post and was still unable to resolve my issue. The accepted answer is to simply update Google Play Services, which I did to no avail. The second highest ranking answer seems specifically tailored to Firebase, which I have no intention of using if not necessary. – PaulG Oct 24 '18 at 20:25