bynk.actor.bearer_missing_secret
Error A Bearer actor does not name its signing secret.
A Bearer actor checks a JWT signed with a shared key, so the compiler needs to know which key. Name the environment variable that holds it: Bearer(secret = "JWT_KEY"). The string is the variable's name, never the key itself, so no secret is written in the source; the Secrets capability reads the value at run time. An Oidc actor needs no secret, because it checks the provider's public keys, and a Signature actor has its own bynk.actor.signature_missing_secret.
Example
type UserId = String where NonEmpty
actor User { auth = Bearer, identity = UserId } // ✗ no signing secret named
actor User { auth = Bearer(secret = "JWT_KEY"), identity = UserId } // ✓ the env var that holds the keyIn the Book
See also
- Every code in its category, Actors, on the diagnostic index.
bynk explain bynk.actor.bearer_missing_secretshows the same from the installed toolchain, without a network.