As other people say, you cannot share cookies, but you could do something like this:

  1. centralize all cookies in a single domain, let's say cookiemaker.com
  2. when the user makes a request to example.com you redirect him to cookiemaker.com
  3. cookiemaker.com redirects him back to example.com with the information you need

Of course, it's not completely secure, and you have to create some kind of internal protocol between your apps to do that.

Lastly, it would be very annoying for the user if you do something like that in every request, but not if it's just the first.

But I think there is no other way...

cookie跨域那些事儿- 饭特稠- 博客园

https://www.cnblogs.com/imgss/p/cors.html

2021年3月29日 ... 浏览器要把自己的请求参数带给服务端,服务端校验参数之后,除了返回数据,也可能会顺便把请求是否缓存,cookie等信息告诉浏览器。当请求是跨域请求的 ...

web applications - Cross-Domain Cookies - Stack Overflow

https://stackoverflow.com/questions/3342140/cross-domain-cookies

I know it sounds weird because cookies are specific to a given domain, and we can't access them from different domains; I've however heard of CROSS-DOMAIN ...

Cors跨域(二):实现跨域Cookie共享的三要素-axios 跨域

https://www.51cto.com/article/666576.html

2021年6月15日 ... 本文主角是大家耳熟能详的Cookie,聊聊它在跨域情况下如何实现“共享”?大家都知道Cookie是需要遵守同源策略(SameSite)的,本文将以跨域Cookie信息共享 ...

CORS 跨域Cookie 的设置与获取- 简书

https://www.jianshu.com/p/13d53acc124f

2017年10月8日 ... 前言:在之前的文章中我已经对如何使用CORS 处理跨域请求进行了介绍,在本文中,我将介绍如何在CORS 跨域的情况下设置和获取Cookie,以及在处理跨 ...

cookie - 为什么Cookie不能跨域访问? token怎么实现跨域访问 ...

https://segmentfault.com/q/1010000040311063

2021年7月7日 ... 网上的博客都说cookie不能实现跨域访问, 但是我研究了CORS发现: 服务端响应头传回了Access-Control-Allow-Credentials: true, 则可以跨域传递cookie, ...

跨域无法设置cookie的问题- 腾讯云开发者社区-腾讯云

https://cloud.tencent.com/developer/article/1655690

2020年7月5日 ... 记录一个今天在练习nodejs的时候遇到的一个跨域无法存取cookie的问题. 我想实现的功能就是:在登录页面输值进行登录之后可以把用户的信息存入到cookie ...

实现cookie跨域共享的两种方式_胡子哥_的博客-CSDN博客

https://blog.csdn.net/weixin_43002640/article/details/115187101

2022年8月20日 ... 跨域概念. 在域a下通过ajax 的方式访问域b下的资源。 域相同满足的条件:域名相同(子域名不同视为不同),端口号相同 ...

[GA4] Set up cross-domain measurement - Analytics Help

https://support.google.com/analytics/answer/10071811?hl=en

As a result, Analytics identifies just one user and one session. Note: This setup is not required for subdomains because they share the same cookies with the ...