feat(oauth): add OAuthClient:clear_tokens() method

Problem: no way to wipe just the token file while keeping credentials
intact — `_wipe()` removed both.

Solution: add `clear_tokens()` that removes only the token file.
This commit is contained in:
Barrett Ruth 2026-03-06 12:33:45 -05:00
parent 628286c471
commit fadad3ed95

View file

@ -496,6 +496,11 @@ function OAuthClient:_wipe()
os.remove(vim.fn.stdpath('data') .. '/pending/google_credentials.json')
end
---@return nil
function OAuthClient:clear_tokens()
os.remove(self:token_path())
end
---@param opts { name: string, scope: string, port: integer, config_key: string }
---@return pending.OAuthClient
function M.new(opts)