diff --git a/packages/auth/src/auth-keycloak.js b/packages/auth/src/auth-keycloak.js
index 61bd6865eefced1280e724786f44425f559b54e7..11651c6c99a17431fc519603257c40b5bb474ff2 100644
--- a/packages/auth/src/auth-keycloak.js
+++ b/packages/auth/src/auth-keycloak.js
@@ -166,9 +166,11 @@ export class AuthKeycloak extends AdapterLitElement {
             person: this._user,
         };
 
-        // inject a window.DBPAuth variable for cypress
-        if (window.Cypress) {
+        // inject a window.DBPAuth variable for Cypress/Playwright
+        console.log("window", window);
+        if (window.Cypress || window.playwright) {
             window.DBPAuth = auth;
+            console.log("Cypress/Playwright detected");
         }
 
         this.sendSetPropertyEvent('auth', auth);