r-lib / keyring

:closed_lock_with_key: Access the system credential store from R

Home Page:https://keyring.r-lib.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Setting the keyring password with the file backend

nwstephens opened this issue · comments

I am using the file backend with RStudio Server. When set a key, and no keyring exists, I get prompted to set a keyring password. If I hit cancel, I get a second prompt to enter a password (presumably to unlock the keyring). I would not expect to get this second prompt. Instead, I would expect cancel to mean cancel, and return me to the console. You can see the behavior here:

https://vimeo.com/545784420

@gaborcsardi This issue came about when I was testing askForSecret() with the pro drivers. Calling keyring_create() from askForSecret() makes for a complicated workflow. It might be worth removing the creation of the keyring from the setting of the keyring. In other words, maybe users should have to explicitly create a keyring using the keyring_create command.

Need to check for cancelling, i.e. whether askpass::askpass() returns NULL.

Yes, it does. When I click NULL here is what happens in the console:

> askpass::askpass()
NULL