fix: prevent Supabase client crash in local auth mode
createClient("", "") throws when NEXT_PUBLIC_SUPABASE_URL is not set,
crashing any page that imports supabase. Two fixes:
1. supabase.ts: use dummy localhost URL when Supabase is not configured
so the module loads safely; add getSessionToken() that returns the
local JWT or Supabase session token based on NEXT_PUBLIC_AUTH_MODE.
2. Replace all supabase.auth.getSession() calls in hooks and components
with getSessionToken() so they work in both auth modes.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
| Repository | rglauco/mike |
|---|---|
| Author | Glauco <37829079+rglauco@users.noreply.github.com> |
| Authored | |
| Parents | 1b395c20 |
| Stats | 8 files changed , +38 , -44 |
| Part of | Docker Compose + Local Postgres (Supabase-Optional Mode) |
Capture this commit into my fork
Download a Markdown prompt that tells Claude how to port this
exact commit into your working tree. Run it via
claude -p < capture-commit-139ce362.md
from inside the repo you want the change in.