# `Hush.Provider.OsKeychain`
[🔗](https://github.com/edlontech/hush_os_keychain/blob/main/lib/hush/provider/os_keychain.ex#L1)

Provider to read secrets from the operating system keychain.

The key is the service of a generic password item:

    config :app, MyApp.Repo,
      password: {:hush, Hush.Provider.OsKeychain, "myapp.db_password"}

    # optional, required when several items share a service
    config :hush, Hush.Provider.OsKeychain, account: "ygor"

A missing item, or a machine without a usable store, returns `{:error, :not_found}`
so Hush applies `default` or `optional`. Any other failure returns an error message.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
