fix: send Supabase token on raw fetch in SaaS chat

This commit is contained in:
Anthony Stirling
2026-06-08 16:41:09 +01:00
parent 02d923f378
commit 4cd03be87a
5 changed files with 56 additions and 8 deletions
@@ -13,7 +13,11 @@ export function setupApiInterceptors(client: AxiosInstance): void {
);
}
/** Auth headers for raw fetch() calls (SSE streams, etc.). Proprietary overrides with JWT + XSRF. */
export function getAuthHeaders(): Record<string, string> {
/**
* Auth headers for raw fetch() calls (SSE streams, etc.).
* Proprietary overrides with stored JWT + XSRF; SaaS overrides with the live
* Supabase access token. Async because SaaS has to consult the auth client.
*/
export async function getAuthHeaders(): Promise<Record<string, string>> {
return {};
}