I am trying to create a cookie in Drupal 8.9 with
SameSite=none with secure attribute, using the
Symfony\Component\HttpFoundation\Cookie class but I am unable to do so as the class doesn't allow the secure attribute along with none.
Also, I tried setting the Cookie's secure parameter to
TRUE but it results in infinite redirects in my site. I don't want to implement the solution on site level as it will affect other cookies capabilities. I just want to do this for one particular cookie I am creating.
$cookie = new Cookie(self::SIGMACOOKIENAME, TRUE, 0, '/', NULL, TRUE, FALSE, TRUE, self::SAMESITE_NONE);