v3.1.1 - Fix: Public Profile Access & Error Handling
Description
Resolved an issue preventing unauthenticated users from viewing public profiles and improved the robustness of the profile data fetching logic. This update also includes necessary adjustments to Firebase security rules to permit public access where appropriate.
Changes Made
- Bug Fixes:
- Fixed the "Profile not found" error that occurred when unauthenticated users attempted to view public profiles.
- Improved error handling within the
useProfilehook to gracefully manage Firebase permission errors.
- Technical Improvements:
- Updated Firebase Realtime Database security rules to explicitly support public profile viewing and access to featured projects.
- Added debug logging to the username resolution flow to aid in future troubleshooting.
How It Works
The issue was caused by restrictive database rules blocking read access for users without an active session. The security rules were updated to allow public read access for specific profile paths. Additionally, the useProfile hook was refactored to catch permission-related exceptions and handle them without disrupting the UI.
Full Changelog: v3.1.0...v3.1.1