Only use cookie detection iframe for non-OIDC configurations (#34139)

Closes #20287

Signed-off-by: Jon Koops <jonkoops@gmail.com>
This commit is contained in:
Jon Koops 2024-10-21 13:37:44 +02:00 committed by GitHub
parent ece97f3a41
commit 43a59afc00
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1241,7 +1241,7 @@ function Keycloak (config) {
function check3pCookiesSupported() { function check3pCookiesSupported() {
var promise = createPromise(); var promise = createPromise();
if (loginIframe.enable || kc.silentCheckSsoRedirectUri) { if ((loginIframe.enable || kc.silentCheckSsoRedirectUri) && typeof kc.endpoints.thirdPartyCookiesIframe === 'function') {
var iframe = document.createElement('iframe'); var iframe = document.createElement('iframe');
iframe.setAttribute('src', kc.endpoints.thirdPartyCookiesIframe()); iframe.setAttribute('src', kc.endpoints.thirdPartyCookiesIframe());
iframe.setAttribute('sandbox', 'allow-storage-access-by-user-activation allow-scripts allow-same-origin'); iframe.setAttribute('sandbox', 'allow-storage-access-by-user-activation allow-scripts allow-same-origin');