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:
parent
cb58062464
commit
30dc2363da
2 changed files with 11 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue