jackMort / jackMort/ChatGPT.nvim

1Password prompts for password everytime

Open
#461 2 comments 3 reactions 0 assignees View on GitHub
bug
Dominant language
Lua
Stars
4k
Forks
317
PR merge metrics
No merged PRs in 30d

Description

Ok, so 1password-cli doesn't seem to like whatever it is we do when we invoke it through `api_key_cmd` on Arch. It prompts for authorization everytime.

I can `op read` from that same terminal multiple times and only prompting the first time, however whenever I launch nvim it prompts.

It might be related to `plenary.job` and the fact that 1Password seems to use the TTY to remember sessions:

```
37069 ? Sl 0:00 op read op://Private/openai-api-key/password
```

vs (when running from shell):

```
37425 pts/1 Sl+ 0:00 op read op://Private/openai-api-key/password
```

https://developer.1password.com/docs/cli/app-integration-security/#session-credentials

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the `api_key_cmd` path and its use of `plenary.job`; compare the `op read` process behavior when launched from the shell versus nvim, using the TTY and session-credentials notes in the linked 1Password documentation. Done means repeated nvim launches no longer prompt for authorization when the 1Password session is already available.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua, neovim
Domain
cli, devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.