When I call the SSO through the API, it doesn’t work. It said the cookies and javascript are not enabled.
client.request .post(ssoUrl, { headers: { "Content-Type": "application/json", Accept: "*/*", "User-Agent": "Web/2.0", }, body: JSON.stringify(body), }) .then( function (data) { console.log("=================SSO Response=================", data); return data; }, function (error) { console.log("=================SSO Error=================", error); return error; } );
When I call the SSO through the form submit, it works. It set the token to the cookies.
document.getElementById(`dashboard-targetUrl`).value = dashboardUrl; document.getElementById(`dashboard-ssoProvider`).value = ssoProvider; document.getElementById(`token`).value = token; document.getElementById(`dashboardForm`).submit();
Is there any way to get the cookies after the form approach, because the form approach works?