r-lib / keyring

:closed_lock_with_key: Access the system credential store from R
https://keyring.r-lib.org/
Other
196 stars 28 forks source link

Setting the keyring password with the file backend #106

Closed nwstephens closed 3 years ago

nwstephens commented 3 years ago

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

nwstephens commented 3 years ago

@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.

gaborcsardi commented 3 years ago

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

nwstephens commented 3 years ago

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

> askpass::askpass()
NULL