From 5e8ef7ebc88c8507eb157bc80bd91a53bd80177c Mon Sep 17 00:00:00 2001 From: NazarMykhalkevych Date: Fri, 1 Aug 2025 10:57:27 +0300 Subject: [PATCH] feat(cookie): allow token auth --- src/app/core/interceptors/auth.interceptor.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/app/core/interceptors/auth.interceptor.ts b/src/app/core/interceptors/auth.interceptor.ts index dd4ba3ad2..e2266679a 100644 --- a/src/app/core/interceptors/auth.interceptor.ts +++ b/src/app/core/interceptors/auth.interceptor.ts @@ -5,8 +5,6 @@ import { Observable } from 'rxjs'; import { HttpEvent, HttpHandlerFn, HttpInterceptorFn, HttpRequest } from '@angular/common/http'; import { inject } from '@angular/core'; -import { environment } from 'src/environments/environment'; - export const authInterceptor: HttpInterceptorFn = ( req: HttpRequest, next: HttpHandlerFn @@ -33,7 +31,8 @@ export const authInterceptor: HttpInterceptorFn = ( } // TODO: remove this after the migration to the new auth approach is complete - if (token && !environment.production) { + // if (token && !environment.production) { + if (token) { headers['Authorization'] = `Bearer ${token}`; }