Skip to content
Playground(another site)

bynk.actor.signed_cookie_identity_not_string_constructible

Error A SignedCookie actor's identity is missing or not a string-constructible type.

The identity is minted from the cookie's sub claim, which is a string, so it must be a refined or opaque String type that this context owns. Declare identity = T.

Example

actor User { auth = SignedCookie(secret = "SESSION_KEY", ttl = 12.hours) } // ✗
actor User { auth = SignedCookie(secret = "SESSION_KEY", ttl = 12.hours), identity = UserId } // ✓

In the Book

See also

  • Every code in its category, Actors, on the diagnostic index.
  • bynk explain bynk.actor.signed_cookie_identity_not_string_constructible shows the same from the installed toolchain, without a network.