@@ -291,16 +291,19 @@ There are two ways to handle OAuth authentication with Google:
291291 executed to obtain a fresh access token on demand. Vdirsyncer passes the
292292 token as a ``Bearer `` header and re-runs the command on 401 responses.
293293
294- With ``token_command ``, you do not need to register a Google Cloud project or
295- install ``aiohttp-oauthlib ``. Any OAuth helper that prints an access token to
296- stdout works, e.g. `oama <https://github.com/pdobsan/oama >`_::
294+ With ``token_command ``, vdirsyncer doesn't need OAuth credentials or
295+ ``aiohttp-oauthlib ``. The external helper handles Google registration. The format is
296+ ``["strategy", "arg1", ...] ``, same as :ref: `the .fetch config values
297+ <fetch_params>`. Supported strategies are ``command `` (exec directly) and
298+ ``shell `` (run via shell)::
297299
298300 [storage my_google_cal]
299301 type = "google_calendar"
300- token_command = ["oama", "access", "my-google-account"]
302+ token_command = ["command", " oama", "access", "my-google-account"]
301303
302- The command can be specified as a list (executed directly) or a string (run via
303- shell).
304+ Or using a shell command::
305+
306+ token_command = ["shell", "oama access my-google-account"]
304307
305308Built-in OAuth setup
306309++++++++++++++++++++
@@ -370,10 +373,12 @@ itself or write anything to it.
370373 :param client_id/client_secret: OAuth credentials, obtained from the Google
371374 API Manager. Optional if ``token_command ``
372375 is set.
373- :param token_command: Command to fetch an OAuth access token. Can be a list
374- of arguments or a string (run via shell). The command
375- must print a valid bearer token to stdout. When set,
376- ``token_file `` and OAuth credentials are not required.
376+ :param token_command: Fetch strategy for OAuth access token, same format as
377+ ``.fetch `` params: ``["strategy", "arg1", ...] ``.
378+ Supported strategies: ``command ``, ``shell ``.
379+ The command must print a valid bearer token to stdout.
380+ When set, ``token_file `` and OAuth credentials are not
381+ required.
377382
378383.. storage :: google_contacts
379384
@@ -393,10 +398,12 @@ itself or write anything to it.
393398 :param client_id/client_secret: OAuth credentials, obtained from the Google
394399 API Manager. Optional if ``token_command ``
395400 is set.
396- :param token_command: Command to fetch an OAuth access token. Can be a list
397- of arguments or a string (run via shell). The command
398- must print a valid bearer token to stdout. When set,
399- ``token_file `` and OAuth credentials are not required.
401+ :param token_command: Fetch strategy for OAuth access token, same format as
402+ ``.fetch `` params: ``["strategy", "arg1", ...] ``.
403+ Supported strategies: ``command ``, ``shell ``.
404+ The command must print a valid bearer token to stdout.
405+ When set, ``token_file `` and OAuth credentials are not
406+ required.
400407
401408The built-in OAuth flow is not ideal, but Google has deprecated the previous
402409APIs used for this without providing a suitable replacement. See :gh: `975 ` for
0 commit comments