Authentication with Google


#1

I am trying to sign in with Google but have error:

Your request parameters did not validate.

I have registered the app in Google api console, and i have receiving token when the user sign in.

Task<GoogleSignInAccount> task = GoogleSignIn.getSignedInAccountFromIntent(data);
           
               GoogleSignInAccount mAccount = task.getResult(ApiException.class);

                String idToken = mAccount.getIdToken();
              

then i pass this token to SyncCredentials.google(token)

public void login(String token, boolean isAdmin) {

        SyncCredentials credentials = SyncCredentials.google(token);

        SyncUser.logInAsync(credentials, AppConsts.AUTH_URL, new SyncUser.Callback<SyncUser>() {

            @Override
            public void onSuccess(@NonNull SyncUser user) {
                Log.d(TAG, "onSuccess: ");
                userLoggedIn();
            }

            @Override
            public void onError(@NonNull ObjectServerError error) {
                Log.d(TAG, "onError: " + error.getErrorMessage());
            }
        });
    }

What i missed?