fix(sync): auth and health UX improvements (#75)
Problem: Failed token exchange left credential files on disk, trapping users in a broken auth loop with no way back to setup. The `auth` prompt used raw backend names and a terse prompt string. The `health` action appeared in `:Pending gcal health` tab completion but silently no-oped outside `:checkhealth`. gcal health omitted the token check that gtasks had. Solution: `_exchange_code` now calls `_wipe()` on both failure paths, clearing the token and credentials files so the next `:Pending auth` routes back through `setup()`. Prompt uses full service names and "Authenticate with:". `health` is filtered from sync subcommand completion and dispatch — its home is `:checkhealth pending`. gcal health now checks for tokens.
This commit is contained in:
parent
84437155bc
commit
829afd25b4
4 changed files with 19 additions and 5 deletions
|
|
@ -216,7 +216,7 @@ end, {
|
|||
end
|
||||
local actions = {}
|
||||
for k, v in pairs(mod) do
|
||||
if type(v) == 'function' and k:sub(1, 1) ~= '_' then
|
||||
if type(v) == 'function' and k:sub(1, 1) ~= '_' and k ~= 'health' then
|
||||
table.insert(actions, k)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue