-
Notifications
You must be signed in to change notification settings - Fork 262
Description
Describe the bug
Description
Our website monitoring application deployed on StackBlitz WebContainer is experiencing critical authentication and session management issues that significantly impact user experience and core functionality.
Environment
- Platform: StackBlitz WebContainer
- Framework: React with TypeScript
- Authentication: Supabase
- Database: Supabase
- Project URL: https://websitemonitors.top
Issues
1. Monitored URLs Display Issue
Previously entered monitored websites are not displayed when using the "View Monitored URLs" link with a valid email account, despite being properly stored in the database.
2. Session Persistence Issue
The "Sign Out" link is incorrectly displayed on subsequent page visits (not initial page visit), indicating improper session management. This occurs even with explicit session non-persistence configuration.
Steps to Reproduce
Monitored URLs Display Issue
- Navigate to websitemonitors.top
- Enter one or more URLs
- Enable "Monitor Websites"
- Configure ping and report frequencies
- Enter email address
- Click "Ping Websites"
- Verify URLs are displayed
- Close page
- Reopen websitemonitors.top
- Click "View Monitored URLs"
- Enter the same email address
- Expected: Previously monitored URLs should appear
- Actual: No URLs are displayed
Session Persistence Issue
- Close the page completely
- Open websitemonitors.top
- On subsequent page visits:
- Expected: "View Monitored URLs" link visible
- Actual: "Sign Out" link incorrectly displayed
Technical Implementation
// src/supabase.ts
export const supabase = createClient(supabaseUrl, supabaseKey, {
auth: {
persistSession: false,
autoRefreshToken: false,
detectSessionInUrl: false
}
});Despite explicit configuration to prevent session persistence, the issues persist.
Impact
These issues significantly affect the core functionality of the application:
- Users cannot view their monitored URLs without re-adding them
- Incorrect session state creates a confusing user experience
- Authentication state becomes unreliable between visits
Additional Context
- The issues appear to be specific to the WebContainer environment
- Local development testing shows correct behavior
- All authentication configurations follow recommended practices
Questions
- Are there known issues with session management in WebContainer?
- Are there specific configurations needed for Supabase authentication in WebContainer?
- Is there a recommended approach for handling authentication state in WebContainer?
Attachments
- Project URL: https://websitemonitors.top
- Full implementation details available upon request
Link to the blitz that caused the error
Steps to reproduce
Monitored URLs Display Issue
Navigate to websitemonitors.top
Enter one or more URLs
Enable "Monitor Websites"
Configure ping and report frequencies
Enter email address
Click "Ping Websites"
Verify URLs are displayed
Close page
Reopen websitemonitors.top
Click "View Monitored URLs"
Enter the same email address
Expected: Previously monitored URLs should appear
Actual: No URLs are displayed
Expected behavior
Expected: Previously monitored URLs should appear
Expected: "View Monitored URLs" link visible
Parity with Local
- I have run the project in my local machine and I could not reproduce the issue.
Screenshots
No response
Platform
- OS: [ChromeOS
- Browser: [Chrome]
- Version: [Version 132.0.6834.206 (Official Build) (64-bit)]
Additional context
No response