fix(credentials): cache credentials after prompt and clear cookies on logout

Problem: \`prompt_and_login\` never called \`cache.set_credentials\` on
success, so the fast path in \`M.login\` never triggered on subsequent
calls. \`M.logout\` only cleared the plugin credentials cache, leaving
browser cookie files on disk.

Solution: call \`cache.set_credentials\` after a successful
\`prompt_and_login\`. Add \`COOKIE_FILE\` constant and update \`M.logout\`
to remove the platform's entry from the shared cookie file.
This commit is contained in:
Barrett Ruth 2026-03-07 03:46:34 -05:00
parent cb58062464
commit 30dc2363da
Signed by: barrett
GPG key ID: A6C96C9349D2FC81
2 changed files with 11 additions and 0 deletions

View file

@ -219,4 +219,6 @@ M.LANGUAGE_VERSIONS = {
M.DEFAULT_VERSIONS = { cpp = 'c++20', python = 'python3' }
M.COOKIE_FILE = vim.fn.expand('~/.cache/cp-nvim/cookies.json')
return M