Trying to get tokenId when registering via Google LogIn button.

Now it works like this for me, I just registered in the Google console of the Web and Android and when prompted in the method

 @NonNull private GoogleSignInOptions getGoogleSignInOptions() { return new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN) .requestIdToken(context.getResources().getString(R.string.server_id_test)) .build(); } 

I use WebId and everything works.

But then I created another account in the google console and did the same there, and when I now use WebId from the second account, I get a response

Status {statusCode = unknown status code: 12501, resolution = null}

I read what I can do and didn’t find anything sensible, I’m doing everything as it should be, the only thing different is that some developers download the Google Configuration file and put it into the project.

But why, then, in my first case, I did not download any file and it works, but in the second case, no ...

Do you need to download this file and if so where to put it?

From where do I get google-services.json or not here?

enter image description here

  • if you're talking about google-services.json, then yes, it should be in the app - Kirill Stoianov
  • @KirillStoianov it’s not clear what happens ... Well, now I don’t have this file in the application and everything works, I just switch to another one in the Web ID method and everything ... does not work ... I tried to download this google-services.json but for some reason I have it called like this client_secret_269322426048-o45crnrc6hnb200lhdam1uqisi0.apps.googleusercontent.com.json . maybe not from there shake? I take it as shown in the screenshot I added in response ... Or not so? - Aleksey Timoshchenko
  • it should be called google-services.json, take a look at this link stackoverflow.com/questions/34367870/… - Kirill Stoianov
  • @KirillStoianov I added this file, but still it’s not clear why if I need it so much, my code worked fine without it ... And tokenId you get tokenId in your code? I just get it for 4 lines ... I'm not sure that this is normal ...? - Aleksey Timoshchenko
  • I do not remember, right now I can not see! - Kirill Stoianov

0