title: How to make Google sign-in token valid for longer than 1 hour?
body: <p>I have implemented google sign-in successfully.</p>
  
  <p>I am able to authenticate user and in response I receive token. However the token expires in 1 hour.</p>
  
  <p><code>expires_in: "3600"</code></p>
  
  <p>I tried searching in the docs - <a href="https://developers.google.com/identity/sign-in/web/reference" rel="noreferrer">https://developers.google.com/identity/sign-in/web/reference</a> - but cannot find a paramenter to extend the lifespan of the token.</p>
  
  <p><a href="https://i.stack.imgur.com/90ewj.png" rel="noreferrer"><img src="https://i.stack.imgur.com/90ewj.png" alt="enter image description here"></a></p>
  
  <hr>
  
  <h2>What I'm actually trying to do?</h2>
  
  <p><a href="https://developers.google.com/identity/sign-in/web/backend-auth" rel="noreferrer">https://developers.google.com/identity/sign-in/web/backend-auth</a></p>
  
  <blockquote>
    <p>after a user successfully signs in, send the user's ID token to your server using HTTPS</p>
  </blockquote>
  
  <p>I'm sending token with each request to the server:</p>
  
  <p><code>endpoint/get?access_token=" + access_token</code></p>
  
  <p>And then on the server I'm calling <code>https://www.googleapis.com/oauth2/v3/tokeninfo</code></p>
  
  <p>So I have a token, every request is authenticated, but after 1 hour of working the <code>tokeninfo</code> method returns <strong>false</strong> and I need to re-authenticate the user.</p>
  
  <p>In my code I circumvented that by storing all the historical <code>access_tokens</code> and if client uses old token I check against historical data and manually issue new token using <code>refresh_token</code> <em>(one of my permissions is to grant offline access)</em></p>
  
  <hr>
  
  <p>So yes, I'd be very interested to know:</p>
  
  <ul>
  <li>How to expand lifespan of the <code>access_token</code>?</li>
  </ul>
  
  <p>OR</p>
  
  <ul>
  <li>Given the limited lifespan how to ensure requests are authenticated on the backend?</li>
  </ul>