Commit Graph

5 Commits

Author SHA1 Message Date
57b23a304c fix: Resolve Supabase auth loop and implement secure authentication system
This commit fixes the persistent login/redirect loop issue and implements
a robust authentication system for the Docker/localhost environment.

Key Changes:
- Environment-aware cookie configuration in supabase-ssr.ts
- New AuthLoader component to prevent content flashing during auth checks
- Cleaned up login page client-side auth logic to prevent redirect loops
- Updated dashboard to use AuthLoader for smooth authentication experience

Technical Details:
- Cookies now use environment-appropriate security settings
- Server-side auth verification eliminates client-side timing issues
- Loading states provide better UX during auth transitions
- Unified authentication pattern across all protected pages

Fixes:
- Dashboard no longer flashes before auth redirect
- Login page loads cleanly without auth checking loops
- Cookie configuration works correctly in Docker localhost
- No more redirect loops between login and dashboard pages

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-12 21:40:41 -06:00
83470449e8 fix: Implement comprehensive Supabase cookie configuration for Docker environment
Client-side improvements (supabase.ts):
- Set detectSessionInUrl: false to prevent SSR redirect loops
- Add explicit cookieOptions with Docker-friendly settings
- Configure secure: false for localhost non-HTTPS
- Set sameSite: 'lax' for proper navigation cookie handling

Server-side improvements (supabase-ssr.ts):
- Add comprehensive default cookie options
- Ensure consistent cookie configuration across all server clients
- Set maxAge: 7 days for proper session persistence
- Maintain security with httpOnly: true

These changes address session persistence issues in Docker containers
and should resolve Stripe setup redirect loops for existing users.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-12 21:15:27 -06:00
03e3d8241c fix: Configure Supabase SSR cookies for Docker/localhost environment
- Set secure: false for localhost (non-HTTPS) environment
- Configure sameSite: 'lax' to allow cookie transmission
- Ensure path: '/' for site-wide cookie access
- Maintain httpOnly: true for security

This should resolve session persistence issues in Docker containers.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-12 21:10:50 -06:00
d76229478d 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>
2025-07-12 21:01:43 -06:00
26a87d0d00 feat: Complete platform enhancement with multi-tenant architecture
Major additions:
- Territory manager system with application workflow
- Custom pricing and page builder with Craft.js
- Enhanced Stripe Connect onboarding
- CodeReadr QR scanning integration
- Kiosk mode for venue sales
- Super admin dashboard and analytics
- MCP integration for AI-powered operations

Infrastructure improvements:
- Centralized API client and routing system
- Enhanced authentication with organization context
- Comprehensive theme management system
- Advanced event management with custom tabs
- Performance monitoring and accessibility features

Database schema updates:
- Territory management tables
- Custom pages and pricing structures
- Kiosk PIN system
- Enhanced organization profiles
- CodeReadr integration tables

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-12 18:21:40 -06:00