The default backend is selected
based on the
keyring_backend option. See
This can be set to a character string, and then the
string class is used to create the default backend.
If this is not set, then the
R_KEYRING_BACKEND environment variable
If this is not set, either, then the backend is selected automatically, based on the OS:
On Windows, the Windows Credential Store (
"wincred") is used.
On macOS, Keychain services are selected (
Linux uses the Secret Service API (
and it also checks that the service is available. It is typically
only available on systems with a GUI.
If the file backend (
"file") is available, it is selected.
On other operating systems, secrets are stored in environment
default_backend(keyring = NULL)
Character string, the name of the keyring to use,
The backend object itself.
Most backends support multiple keyrings. For these the keyring is selected from:
keyring argument (if not
You can change this by using
options(keyring_keyring = "NEWVALUE")
If this is not set, the
R_KEYRING_KEYRING environment variable.
Finally, if neither of these are set, the OS default keyring is used.
Usually the keyring is automatically unlocked when the user logs in.