Please anyone know how I can solve this?
I have this code
const supabase_url=process.env.NEXT_PUBLIC_SUPABASE_URL
const service_role_key=process.env.SUPABASE_SERVICE_ROLE_SECRET
const supabase = createClient(supabase_url, service_role_key, {
auth: {
autoRefreshToken: false,
persistSession: false
}
})
const { data: { users }, error } = await supabase.auth.admin.listUsers()
trying to fetch users list and I get “invalid API key”. Can someone help me fix this issue?
I have tried to upgrade current user from authenticated to admin using the SQL editor. Doesn’t look like that’s the issue.