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)