From b768043bcc59e92ea130dd8cc1e9f04ed361ef61 Mon Sep 17 00:00:00 2001 From: Giuseppe Digilio Date: Thu, 23 Jan 2020 09:57:49 +0100 Subject: [PATCH] Add withCredentials param to ServerAuthService's checkAuthenticationCookie method --- src/app/core/auth/server-auth.service.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/core/auth/server-auth.service.ts b/src/app/core/auth/server-auth.service.ts index 31b99c94d2..f6ff454a7b 100644 --- a/src/app/core/auth/server-auth.service.ts +++ b/src/app/core/auth/server-auth.service.ts @@ -1,8 +1,8 @@ -import { filter, map, switchMap, take } from 'rxjs/operators'; import { Injectable } from '@angular/core'; import { HttpHeaders } from '@angular/common/http'; import { Observable } from 'rxjs'; +import { filter, map, switchMap, take } from 'rxjs/operators'; import { HttpOptions } from '../dspace-rest-v2/dspace-rest-v2.service'; import { AuthStatus } from './models/auth-status.model'; @@ -59,6 +59,7 @@ export class ServerAuthService extends AuthService { headers = headers.append('X-Requested-With', referer); } options.headers = headers; + options.withCredentials = true; return this.authRequestService.getRequest('status', options).pipe( map((status: NormalizedAuthStatus) => Object.assign(new AuthStatus(), status)) );