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

Allow definition of prompt in key_set() #112

Closed pnacht closed 2 years ago

pnacht commented 3 years ago

key_set calls askpass::askpass (with many intermediate calls along the way) to display the UI. askpass::askpass takes a single argument prompt which is shown above the textbox.

The call to askpass::askpass is done within get_pass, which also takes prompt as an argument (default "Password: "). However, the call to get_pass (in b_wincred_set at least) is argument-less: get_pass(). Therefore the UI is effectively hard-coded to display "Password: " as the prompt.

Since the secrets stored on the keychain aren't necessarily passwords, it'd be great if that prompt were customizable.

gaborcsardi commented 3 years ago

Do you want to submit a PR?

gaborcsardi commented 2 years ago

Fixed in #113.