Description
The Cart page can currently be accessed without user authentication. Users who have not logged in are still able to navigate to the Cart page through the navigation bar, which bypasses the expected authentication flow.
Since the Cart is intended to store and manage user-specific items before checkout, unauthenticated users should not be able to access this page directly.
Current Behavior
- The Cart page is accessible without logging in.
- Users can navigate to the Cart page directly from the navigation menu while unauthenticated.
- No authentication check or redirection is performed.
Expected Behavior
- Unauthenticated users should be redirected to the Login page when attempting to access the Cart page.
- The Cart page should only be available after successful user authentication.
- Appropriate route protection should be implemented for restricted pages.
Steps to Reproduce
- Open the application.
- Navigate to the Login page.
- Do not enter any credentials.
- Click on the "Cart" option in the navigation bar.
- Observe that the Cart page opens successfully without requiring authentication.
Impact
This behavior allows users to access a restricted user-specific page without authentication, resulting in an inconsistent user flow and potential access-control concerns.
Suggested Fix
Add authentication checks before rendering the Cart page and redirect unauthenticated users to the Login page.
Description
The Cart page can currently be accessed without user authentication. Users who have not logged in are still able to navigate to the Cart page through the navigation bar, which bypasses the expected authentication flow.
Since the Cart is intended to store and manage user-specific items before checkout, unauthenticated users should not be able to access this page directly.
Current Behavior
Expected Behavior
Steps to Reproduce
Impact
This behavior allows users to access a restricted user-specific page without authentication, resulting in an inconsistent user flow and potential access-control concerns.
Suggested Fix
Add authentication checks before rendering the Cart page and redirect unauthenticated users to the Login page.