i am using using fire base google sigin once user do google sigin in my android app i will get account using the android code `

GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
                .requestIdToken(getString(R.string.default_web_client_id))
                .requestServerAuthCode(getString(R.string.default_web_client_id), false)
                .requestEmail()
                .build();

mGoogleApiClient = new GoogleApiClient.Builder(this)
                .enableAutoManage(this, this)
                .addApi(Auth.GOOGLE_SIGN_IN_API, gso)
                .build();

GoogleSignInResult result = Auth.GoogleSignInApi.getSignInResultFromIntent(data);
            if (result.isSuccess()) {

                GoogleSignInAccount account = result.getSignInAccount();

                account .getServerAuthCode();
            } else {
                LogUtil.d(TAG, "result is fail = "+result);
            }

`

please check below post man photo to send post request to get access token postman tried image

i noticed that default_web_client_id(google generated in app) that is

<string name="default_web_client_id" translatable="false">457480315155-7f78c0vsh3gr0jt0ooon....</string> and i created client_id and client_secret both are different it should be same ?

0 Answers