From ae4a8429c79ee7fd9c313635d4b551ef5d2e5671 Mon Sep 17 00:00:00 2001 From: DanielS Date: Thu, 9 Jul 2026 23:16:22 +0200 Subject: [PATCH] fix: rewrite auth middleware to prevent global login lock for partners and admins --- shop/lib/actions/auth.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/shop/lib/actions/auth.ts b/shop/lib/actions/auth.ts index bdb7674..4f9170e 100644 --- a/shop/lib/actions/auth.ts +++ b/shop/lib/actions/auth.ts @@ -45,7 +45,8 @@ export async function signIn(email: string, password: string) { const userId = data.user?.id if (userId) { - let { data: userData, error: userError } = await supabase + const adminClient = createAdminClient() + let { data: userData, error: userError } = await adminClient .from('users') .select('role') .eq('id', userId)