Skip to content
Playground(another site)

bynk.actor.signed_cookie_not_in_sum

Error A SignedCookie actor appears as a member of a multi-actor sum.

A multi-actor by clause tries its peers in turn. A cookie is an ambient credential, so the CSRF check must apply only when the cookie is what authenticated the request, and that per-arm rule is not built yet. A SignedCookie actor therefore stands alone on its route: give it a single by who: User and serve any anonymous route separately.

Example

on POST("/x") () -> Effect[HttpResult[String]] by who: User | Visitor { // ✗ a `SignedCookie` peer in a sum
on POST("/x") () -> Effect[HttpResult[String]] by who: User { // ✓ alone

In the Book

See also

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