fix: Resolve Supabase SSR cookie handling and auth test page issues
- Add null checks for cookies object in Supabase SSR client - Fix auth test page to use Astro.cookies instead of Astro.request - Prevent "Cannot read properties of undefined" errors in cookie handling - Ensure proper unified auth usage pattern in test pages 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -11,8 +11,8 @@ let cookies = null;
|
||||
let headers = null;
|
||||
|
||||
try {
|
||||
// Test unified auth
|
||||
auth = await verifyAuth(Astro.request);
|
||||
// Test unified auth - use Astro.cookies for pages
|
||||
auth = await verifyAuth(Astro.cookies);
|
||||
|
||||
// Capture debug info
|
||||
cookies = Astro.request.headers.get('Cookie') || 'No cookies';
|
||||
|
||||
Reference in New Issue
Block a user