Not firebase Auth for google sign: Unable to parse Google id_token:54....

1,069 views
Skip to first unread message

Сергей Лоскутников

unread,
Nov 4, 2017, 8:32:40 AM11/4/17
to Firebase Google Group

 Please Help !
    I work with firebase sdk for C++ and I try to log in through Google sign-in my android app. But I get the following error: 

      An internal error has occurred. [ Unable to parse Google id_token:155194344....tent.com
   I'll now describe in steps where I get my Google id_token and if someone has already encountered this problem and solved it, then he will tell me. Thank you in advance, he will greatly help me with this
    

      Here I take my Google id_token screenshot 1
  

   Here I get it : screenshot 2 

     Generating  google-services.json and put it in my android project screenshot 3 

     

       

        firebase::auth::Credential google_app_cred = firebase::auth::GoogleAuthProvider::GetCredential(
        losToken, nullptr);
firebase::Future<firebase::auth::User *> google_goodLos = auth->SignInWithCredential(
google_app_cred);
        

   And I can not do anything - it gives an error. And yes, I certainly generated keytool -exportcert ... 
     I will be very happy with any help. Thank you in advance

Ian Barber

unread,
Nov 4, 2017, 1:15:02 PM11/4/17
to Firebase Google Group
That value is the client ID - the id token is something you get after sign in. Screenshots look ok, but the error is indicating that the value passed for the ID token is no good. 

Before you call firebase::auth::GoogleAuthProvider::GetCredential you should be calling Google Sign In APIs to get an ID token - that represents the user you're trying to sign in with. According to the docs, you have to do that on the iOS or Android side, then pass the value back to your C++ code.

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/83b03c56-5d79-4336-ac80-ae7e59f9d65d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages