// this is our possible base64-encoded byte array — serialized — flash cookie
val flashCookie: Option[String] = request.headers
  .get[Cookie]
  .flatMap(_.values.find(_.name == "flash"))
  .map(_.content)

// aquí tienes, voilà
flashCookie.map(_.decode).sequence.fold(
  _ => BadRequest("failed to deserialize cookie, this is very bad"),
  cookie => Ok(renderPage(cookie)) // or do whatever we want with our freshly baked Option[Map[String, String]]
) // F[Response[F]]