bynk.actor.oidc_missing_audience
Error An Oidc actor does not name its audience.
A provider signs tokens for many services, and each token is issued for one. An Oidc actor therefore names its audience, the aud claim a token must carry, so a token issued for some other API is refused here even though its signature is valid. Add audience = "…" with the identifier your provider uses for this API. The issuer and key set have their own codes, bynk.actor.oidc_missing_issuer and bynk.actor.oidc_missing_jwks.
Example
type UserId = String where NonEmptyactor User { auth = Oidc(issuer = "https://issuer.example", jwks = "https://issuer.example/jwks"), identity = UserId } // ✗ no audience
actor User { auth = Oidc(issuer = "https://issuer.example", audience = "my-api", jwks = "https://issuer.example/jwks"), identity = UserId } // ✓ the `aud` this API acceptsIn the Book
See also
- Every code in its category, Actors, on the diagnostic index.
bynk explain bynk.actor.oidc_missing_audienceshows the same from the installed toolchain, without a network.