📄 SKILL.md

← Vault

name: supabase-auth-rest-nodejs

description: "Bypass Supabase JS client for auth in Node.js 18+ — use REST API fetch instead of createClient.getUser() to avoid RealtimeClient/WebSocket crashes"

category: devops


Supabase Auth REST API Pattern (Node.js)

Problem

createClient from @supabase/supabase-js always initializes RealtimeClient internally, even with realtime: false. RealtimeClient unconditionally imports ws (the npm package), which fails on Node.js 18+ because: