diff --git a/src/app/@core/configs/keycloak.config.ts b/src/app/@core/configs/keycloak.config.ts index 003fdd9..3b624f0 100644 --- a/src/app/@core/configs/keycloak.config.ts +++ b/src/app/@core/configs/keycloak.config.ts @@ -7,11 +7,11 @@ export function initializeKeycloak(keycloak: KeycloakService) { keycloak.isLoggedIn().then(loggedIn => { if (!loggedIn) { const expirationDate: Date = new Date(0); - document.cookie = `${environment.cookies.token.name}=; expires=${expirationDate.toUTCString()}; path=/`; + document.cookie = `${environment.cookies.token.name}=; expires=${expirationDate.toUTCString()}; path=/; domain=${environment.cookies.token.domain}; SameSite=Stric`; } else { const token: string = keycloak.getKeycloakInstance().token; if (token && token !== '') { - document.cookie = `${environment.cookies.token.name}=${token}; path=/; domain=${environment.cookies.token.domain}; expires=Session; SameSite=Strict`; + document.cookie = `${environment.cookies.token.name}=${token}; expires=Session; path=/; domain=${environment.cookies.token.domain}; SameSite=Strict`; } } }) diff --git a/src/environments/environment.ts b/src/environments/environment.ts index 3af8e83..375df78 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -22,7 +22,7 @@ export const environment = { cookies: { token: { name: 'auth_user_id', - domain: '.develop.eoepca.org' + domain: 'localhost' } } }; \ No newline at end of file