hammerspoon2-docs
    Preparing search index...

    Function get

    • Read a secret. If it was stored with requireUserPresence, macOS asks you to authenticate first, and the Promise settles once you have.

      Parameters

      • service: string

        The service the secret was stored with

      • account: string

        The account the secret was stored with

      • Optionalreason: string | null

        Why the secret is needed, shown in the authentication prompt, as in "Hammerspoon 2 is trying to reason"

      Returns Promise<string | null>

      A Promise that resolves to the secret, or null if there's no secret for that service and account, and rejects with an Error if it can't be read (e.g. with code ECANCELED if you cancel the authentication prompt)