diff --git a/dmp-frontend/src/app/core/services/auth/auth.service.ts b/dmp-frontend/src/app/core/services/auth/auth.service.ts index 9b61514c4..af4604994 100644 --- a/dmp-frontend/src/app/core/services/auth/auth.service.ts +++ b/dmp-frontend/src/app/core/services/auth/auth.service.ts @@ -14,6 +14,7 @@ import { environment } from 'environments/environment'; import { Observable, of as observableOf, throwError as observableThrowError } from 'rxjs'; import { catchError, map, takeUntil } from 'rxjs/operators'; import { ConfigurationService } from '../configuration/configuration.service'; +import { CookieService } from 'ngx-cookie-service'; @Injectable() export class AuthService extends BaseService { @@ -26,7 +27,8 @@ export class AuthService extends BaseService { private language: TranslateService, private router: Router, private uiNotificationService: UiNotificationService, - private configurationService: ConfigurationService + private configurationService: ConfigurationService, + private cookieService: CookieService ) { super(); @@ -73,6 +75,7 @@ export class AuthService extends BaseService { return this.http.post(url, loginInfo, { headers: this.headers }).pipe( map((res: any) => { const principal = this.current(res.payload); + this.cookieService.set('cookiesConsent', 'true', 356); //this.loginContextSubject.next(true); return principal; }), @@ -89,6 +92,7 @@ export class AuthService extends BaseService { return this.http.post(url, credentials, { headers: this.headers }).pipe( map((res: any) => { const principal = this.current(res.payload); + this.cookieService.set('cookiesConsent', 'true', 356); //this.loginContextSubject.next(true); return principal; }),