You need to sign in to do that
Don't have an account?
James George
Enhanced domain third party cookie issue
Hi All,
Anybody facing issue with the new Enhanced domain implementation, I am not able to get the handle to the cookies.
Any help will be much appreciated.
Below is my scenerio/steps
1. salesforce sets the cookie value using an LWC component.
2. Re-directs the page to OKTA for authentication.
3. OKTA after authentication re-directs to a visual force page where the Javascript tried to read the cookie already set in the step 1.
The value reading the while reading the cookie is 'undefined'
It's all working well without Enhanced domain implementation enabled, As Jan 10 2023 is the cutoff date of mandatory implementation of Enhanced Domain on Sandboxes, we are trying to resolve this issue before the cut-off date.
Thanks,
James
Anybody facing issue with the new Enhanced domain implementation, I am not able to get the handle to the cookies.
Any help will be much appreciated.
Below is my scenerio/steps
1. salesforce sets the cookie value using an LWC component.
2. Re-directs the page to OKTA for authentication.
3. OKTA after authentication re-directs to a visual force page where the Javascript tried to read the cookie already set in the step 1.
The value reading the while reading the cookie is 'undefined'
It's all working well without Enhanced domain implementation enabled, As Jan 10 2023 is the cutoff date of mandatory implementation of Enhanced Domain on Sandboxes, we are trying to resolve this issue before the cut-off date.
function getCookie(name) { let cookieString = "; " + document.cookie; let cookies = cookieString.split("; "); let currentCookieVal; cookies.forEach(cookie => { let currentCookieArr = cookie.split('=__'); if(currentCookieArr.length && currentCookieArr.length === 2) { if(currentCookieArr[0].includes(name)) { currentCookieVal = currentCookieArr; } } }); return currentCookieVal; }
Thanks,
James
Enhanced domains comply with the latest browser requirements. Specifically, they avoid third-party cookies, otherwise known as cross-site resources.
Myhdfs Login (https://www.myhdfs.net/)
Hi All,
I resolved the issue by doing the following.
1. Modified the javascript code in the existing vf page
2. Placed all the js code which calling the third party cookie from a newly created LWC component's javascript as there is no problem of LWC component to reach out to third party cookie.
The issue is resolved.
Thanks,
James