diff --git a/frontend/src/app/core/auth/auth.interceptor.ts b/frontend/src/app/core/auth/auth.interceptor.ts
index 37dfcfa8..636e965b 100644
--- a/frontend/src/app/core/auth/auth.interceptor.ts
+++ b/frontend/src/app/core/auth/auth.interceptor.ts
@@ -33,7 +33,7 @@ export const authInterceptor = (
});
}
} else {
- // For IAP, do not modify the request headers
+ // For IAP, do not modify the request headers, the token is sent as a cookie.
newReq = req.clone();
}
@@ -43,8 +43,8 @@ export const authInterceptor = (
// Handle "401 Unauthorized" responses
if (error instanceof HttpErrorResponse && error.status === 401) {
if (environment.auth === 'google_iap') {
- // Redirect to root to trigger IAP authentication
- window.location.href = '/';
+ // Refresh to trigger IAP authentication
+ window.location.reload();
return throwError(() => new Error('Redirecting to IAP authentication'));
} else {
// Sign out and reload the app for other auth modes
diff --git a/frontend/src/app/modules/admin/apps/chat/chat.service.ts b/frontend/src/app/modules/admin/apps/chat/chat.service.ts
index ebdc0019..7e678e76 100644
--- a/frontend/src/app/modules/admin/apps/chat/chat.service.ts
+++ b/frontend/src/app/modules/admin/apps/chat/chat.service.ts
@@ -194,7 +194,7 @@ export class ChatService {
* Reset the selected chat
*/
resetChat(): void {
- this._chat.next({ id: '', messages: [], title: '', updatedAt: Date.now() });
+ this._chat.next(null);
}
diff --git a/frontend/src/app/modules/admin/apps/chat/conversation/conversation.component.html b/frontend/src/app/modules/admin/apps/chat/conversation/conversation.component.html
index 13a1042a..0cd92d8b 100644
--- a/frontend/src/app/modules/admin/apps/chat/conversation/conversation.component.html
+++ b/frontend/src/app/modules/admin/apps/chat/conversation/conversation.component.html
@@ -26,16 +26,18 @@
class="flex h-18 flex-0 items-center border-b bg-gray-50 px-4 dark:bg-transparent md:px-6"
>
-
-
-
+ @if (chats.length) {
+
+
+
+ }