Skip to content

Commit 8b9c92d

Browse files
authored
Merge pull request #244 from CenterForOpenScience/fix/log-out
fix(cookies): get staging cookie
2 parents b5784b6 + 10461be commit 8b9c92d

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

src/app/core/interceptors/auth.interceptor.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ export const authInterceptor: HttpInterceptorFn = (
1212
const cookieService = inject(CookieService);
1313

1414
const csrfToken = cookieService.get('api-csrf');
15-
const staging = cookieService.get('osf_staging4');
16-
console.log(staging);
1715

1816
if (!req.url.includes('/api.crossref.org/funders')) {
1917
const headers: Record<string, string> = {

src/app/features/auth/services/auth.service.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ export class AuthService {
2121

2222
isAuthenticated(): boolean {
2323
const csrfToken = this.cookieService.get('api-csrf');
24+
const staging = this.cookieService.get('osf_staging4');
25+
console.log(staging, csrfToken);
26+
console.log(document.cookie);
2427
const authenticated = !!csrfToken;
2528

2629
this.actions.setAuthenticated(authenticated);

0 commit comments

Comments
 (0)