我想将我的放大身份验证cookie的sameSite策略设置为“无”。
我需要设置此策略,因为我必须访问嵌入不同域网站的iframe中的cookie。
我的iframe被认为是第三方,因为顶级网站的域与iframe中的url不同。CognitoIdentityServiceProvider cookie由于跨源上下文而未发送,因此登录到该站点的用户未登录到iframe中。
我试图更改cookies sameSite策略,如下放大文档:
https://docs.amplify.aws/lib/client-configuration/configuring-amplify-categories/q/platform/js/#general-configuration
// (optional) - Configuration for cookie storage
// Note: if the secure flag is set to true, then the cookie transmission requires a secure protocol
cookieStorage: {
// - Cookie domain (only required if cookieStorage is provided)
domain: '.yourdomain.com',
// (optional) - Cookie path
path: '/',
// (optional) - Cookie expiration in days
expires: 365,
// (optional) - See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite
sameSite: 'strict' | 'lax',
// (optional) - Cookie secure flag
// Either true or false, indicating if the cookie transmission requires a secure protocol (https).
secure: true
},
sameSite='none'似乎在放大配置中不起作用。有没有任何方法可以在跨源上下文中共享Cognito auth cookie?