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:
@@ -12,12 +12,15 @@ export function createSupabaseServerClient(
|
||||
{
|
||||
cookies: {
|
||||
get(name: string) {
|
||||
if (!cookies) return undefined;
|
||||
return cookies.get(name)?.value
|
||||
},
|
||||
set(name: string, value: string, options: CookieOptions) {
|
||||
if (!cookies) return;
|
||||
cookies.set(name, value, options)
|
||||
},
|
||||
remove(name: string, options: CookieOptions) {
|
||||
if (!cookies) return;
|
||||
cookies.delete(name, options)
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user