From 9624bb71acfff4be9ac0250c33f7a02c814fa43a Mon Sep 17 00:00:00 2001 From: admin Date: Sat, 22 Aug 2026 23:09:24 +0000 Subject: [PATCH] Terminal --- src/integrations/supabase/auth-attacher.ts | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 src/integrations/supabase/auth-attacher.ts diff --git a/src/integrations/supabase/auth-attacher.ts b/src/integrations/supabase/auth-attacher.ts deleted file mode 100644 index 5bc57b7..0000000 --- a/src/integrations/supabase/auth-attacher.ts +++ /dev/null @@ -1,15 +0,0 @@ -// This file is automatically generated. Do not edit it directly. -import { createMiddleware } from '@tanstack/react-start' -import { supabase } from './client' - -// Must be registered as a global `functionMiddleware` in `src/start.ts`; otherwise -// the browser never attaches the bearer token to serverFn RPCs. -export const attachSupabaseAuth = createMiddleware({ type: 'function' }).client( - async ({ next }) => { - const { data } = await supabase.auth.getSession() - const token = data.session?.access_token - return next({ - headers: token ? { Authorization: `Bearer ${token}` } : {}, - }) - }, -)