Where rho keeps secrets: the provider sign-ins and API keys
(Rho.Auth), a binary value per string key. A host seam:
config :rho, :credential_store, Module picks the backend.
The default, Rho.CredentialStore.File, keeps each key in a 0600 file
under <data dir>/secure/: right for a computer and for tests. A phone
app plugs in the platform's secure store (Android Keystore / iOS
Keychain); the mob_secure_store plugin's MobSecureStore has exactly
this shape and can be configured as it is. A store that can't work on
this device (its native code missing) should fail closed, answering
every call {:error, :secure_store_unavailable}, rather than fall back
to plain files: Rho.Auth then reports it instead of signing in.
Keys are non-empty UTF-8 strings; values arbitrary binaries (rho stores JSON).
Summary
Callbacks
Removes key; removing an absent one is :ok.
The value at key: {:ok, value}, :error when there is none, {:error, reason} when the store failed.
Upserts key, durably (:ok means written, not queued).
Functions
The backend in effect (Rho.Config.credential_store/0).
The configured backend's delete/1.
The configured backend's put/2.
Callbacks
Removes key; removing an absent one is :ok.
The value at key: {:ok, value}, :error when there is none, {:error, reason} when the store failed.
Upserts key, durably (:ok means written, not queued).