feat(sync): unify Google auth under :Pending auth
Problem: users had to run `:Pending gtasks auth` and `:Pending gcal auth` separately, producing two token files and two browser consents for the same Google account. Solution: introduce `oauth.google_client` with combined tasks + calendar scopes and a single `google_tokens.json`. Remove per-backend `auth`/`setup` from `gcal` and `gtasks`; add top-level `:Pending auth` that prompts with `vim.ui.select` and delegates to the shared client's `setup()` or `auth()` based on credential availability.
This commit is contained in:
parent
87d8bf0896
commit
67aa8d71e6
6 changed files with 45 additions and 54 deletions
|
|
@ -167,7 +167,7 @@ end, {
|
|||
nargs = '*',
|
||||
complete = function(arg_lead, cmd_line)
|
||||
local pending = require('pending')
|
||||
local subcmds = { 'add', 'archive', 'due', 'edit', 'filter', 'undo' }
|
||||
local subcmds = { 'add', 'archive', 'auth', 'due', 'edit', 'filter', 'undo' }
|
||||
for _, b in ipairs(pending.sync_backends()) do
|
||||
table.insert(subcmds, b)
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue