I use google login services to authenticate users who use my application. I got it for work when I just requested information by email.
GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN) .requestEmail().build();
Then I realized that I also needed to request an ID token in order to be able to authenticate with my backend, so I did:
GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN) .requestIdToken(String.valueOf(R.string.server_client_id)) .requestEmail().build();
The problem is that he did not allow me to log in after the changes. The status that I get every time I try to log in is Status{statusCode=unknown status code: 12501, resolution=null} .
I searched around and I found this post , which pretty much applies to the same. However, I did not make mistakes called by the people who responded, the OAuth client ID in my developer console is for the web application:
And R.string.server_client_id is the first client identifier in the picture. package names, of course, are correct in all placed ones, otherwise it will not even work without a token request. 2 people also suggested that the application be signed for this, but the googles documentation says that the debug key should work too, and it makes no sense to get people to sign applications for debugging.
I tried to figure it out for hours, but to no avail. What could be the problem? Please feel free to request additional information that I may have forgotten to put here.
android google-play-services google-signin google-identity
jammaster Nov 21 '15 at 18:06 2015-11-21 18:06
source share