I have an app that is authenticated with another App through SSO. After SSO finished, it set the token into the third-party cookie.
I want to send the request method with the third-party cookie. Now, it doesn’t send my request with the cookie.
How can I do that?
This is how I call the API. I’ve tried what you suggested to me. However, it doesn’t work. I have tried to console.log the cookie but it returns nothing. I tried on local and on the custom app as well.
async function getData(url) {
let cookies = String(document.cookie);
console.log("cookies", cookies);
return await client.request
.get(url, {
headers: {
"Content-Type": "application/json",
Accept: "application/json",
"User-Agent": "Web/2.0",
},
cookies,
})
.then(
function (data) {
console.log(
"=================response=================",
data
);
return data;
},
function (error) {
console.log("=================error=================", error);
return error;
}
);
}
@Nhat_Nguyen ,
Good Day!
Our app is rendered inside the Iframe and the iframe is sandboxed it is not possible to access the third-party cookie from the app.