To use Google services on behalf of a user when the user is offline, you must
use a hybrid server-side flow where a user authorizes your app on the client
side using the JavaScript API client and you send a special one-time
authorization code to your server. Your server exchanges this one-time-use
code to acquire its own access and refresh tokens from Google for the server to
be able to make its own API calls, which can be done while the user is offline.
This one-time code flow has security adva...