0

whats the simple way to set a cookie for a different domain ?

this is how i set the cookie :

CookieOptions cookieOptions = new CookieOptions()
        {
            Expires = dateTimeOffset
            ,
            Domain = domain

            ,
            SameSite = SameSiteMode.None
            ,
            HttpOnly = false
            ,
            Path = "/"

        };

        httpContextAccessor.HttpContext.Response.Cookies.Append(key, value, cookieOptions);

I thought SameSite = SameSiteMode.None will do the job

iam guessing its not

David Munsa
  • 885
  • 1
  • 16
  • 30
  • I'm sorry but it's [not possible](https://stackoverflow.com/questions/3342140/cross-domain-cookies) without cors policies – Alexander Dec 09 '19 at 16:21
  • That's not possible. The browser prevents it – Marcel Dec 09 '19 at 19:06
  • i think i miss understood what i want to do is to store a cookie on a different domain from the request domain this is possible "cross domain cookie" – David Munsa Dec 10 '19 at 07:54

0 Answers0