title: Transferring react client-side google sign-in to ASP.NET server-side
body: <p>I am using <code>react-google-login</code> library to let users sign in my application on the client-side through Google, which works fine and returns token and profile information.</p>
  
  <pre><code>  &lt;GoogleLogin
        clientId="XXXX.apps.googleusercontent.com"
        buttonText="Login"
        onSuccess={responseGoogle}
        onFailure={responseGoogle}
        cookiePolicy={'single_host_origin'}
    /&gt;
  
   const responseGoogle = (response) =&gt; {
       console.log(response);
   }
  </code></pre>
  
  <p>Below is the configuration on the server to enable Google Authentication:</p>
  
  <pre><code>services.AddAuthentication()
      .AddGoogle(options =&gt;
      {
          IConfigurationSection googleAuthNSection = 
              Configuration.GetSection("Authentication:Google");
  
          options.ClientId = googleAuthNSection["ClientId"];
          options.ClientSecret = googleAuthNSection["ClientSecret"];
      });
  </code></pre>
  
  <p>But, I do not how to transfer this successful login to the asp.net server-side. How can I use the token sent by google to sign in the user on the server side? I would like to do this for two cases: (a) the email in the system does not match the gmail, (b) the email in the system matches the gmail. I appreciate any help.</p>