android , facing issues with requestServerAuthCode in google Sign in

Viewed 177

i am facing issue in using requestServerAuthCode with googlesign in . i have created a project on google dev console , added a outh2.0 id , which created Android client id , i also have web client id . now i need to add scopes for calendar for which i have written code,

    GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
   .requestServerAuthCode(getString(R.string.server_client_id)) .requestEmail() .requestProfile() 
   .requestScopes(new Scope("https://www.googleapis.com/auth/calendar")) .build();

If i remove requestServerAuthCode and RequestScopes , i am able to login and get all details of user (there is no problem of SHA1) However if i add them , which i want to there is no error nothing the spinner keeps on loading infinitely I have checked all the settings but not able to proceed , also please note R.string.server_client_id is the Web client id not the android client identer image description here

0 Answers
Related