Description
When the dashboard home page loads, the browser console shows a critical error where the user profile API endpoint is returning a 403 Forbidden response. This means the logged in user does not have permission to access their own profile data or the API authentication token is not being sent correctly with the request. This is a serious backend issue that could cause profile related data to not load correctly on the dashboard.
Goals
-Ensure logged in users can always access their own profile data without any forbidden errors
-Fix the authentication token being sent incorrectly or missing from the API request
-Eliminate the 403 Forbidden console error on the dashboard home page
-Ensure profile related data loads correctly on the dashboard for all users
-Improve overall reliability and stability of the dashboard home page
Expected Outcome
When a logged in user navigates to the dashboard home page, the user profile API endpoint should return a 200 OK response with the correct profile data. No 403 Forbidden errors should appear in the browser console. All profile related data such as the user's name, karma points and level should load and display correctly on the dashboard without any errors.
Acceptance Criteria
-User profile API returns 200 OK when a logged in user loads the dashboard home page
-No 403 Forbidden error appears in the browser console on the dashboard home page
-Profile related data loads and displays correctly on the dashboard for all logged in users
-Authentication token is correctly included in every API request made from the dashboard
-Fix verified and tested on both desktop and mobile views
Implementation Details
-Identify why the user profile API endpoint at mulearn.org/api/v1/d..ile/user-profile/ is returning 403 Forbidden for a logged in user
-Check whether the authentication token is being correctly attached to the API request headers on the frontend
-Check the backend permission classes in the Django REST Framework view to ensure logged in users are allowed to access their own profile data
-If the token is missing or expired on the frontend fix the token refresh logic in React to ensure a valid token is always sent with every API request
-Use Django REST Framework's IsAuthenticated permission class correctly on the user profile view
Mockups / Wireframes
[Include links to any visual aids, mockups, wireframes, or diagrams that help illustrate what the final product should look like. This is not always necessary, but can be very helpful in many cases.]
[Please note that the below section of the ticket has to be in the format as mentioned as it is key to enabling proper listing of the project. Please only choose the options mentioned under the headings wherever applicable.]
Product Name
µLearn
Project Name
[Project Name: Descriptive of the ticket]
Tech Skills Needed:
Python · Django REST Framework · React.js · JWT Authentication · API Debugging
Mentor(s)
[@Mentor1] [@mentor2] [@Mentor3]
Complexity
[High]
Category
Pick one or more of [Security], [Bug],
Sub Category
Pick one or more of [API] [Backend] [Authentication]
Description
When the dashboard home page loads, the browser console shows a critical error where the user profile API endpoint is returning a 403 Forbidden response. This means the logged in user does not have permission to access their own profile data or the API authentication token is not being sent correctly with the request. This is a serious backend issue that could cause profile related data to not load correctly on the dashboard.
Goals
-Ensure logged in users can always access their own profile data without any forbidden errors
-Fix the authentication token being sent incorrectly or missing from the API request
-Eliminate the 403 Forbidden console error on the dashboard home page
-Ensure profile related data loads correctly on the dashboard for all users
-Improve overall reliability and stability of the dashboard home page
Expected Outcome
When a logged in user navigates to the dashboard home page, the user profile API endpoint should return a 200 OK response with the correct profile data. No 403 Forbidden errors should appear in the browser console. All profile related data such as the user's name, karma points and level should load and display correctly on the dashboard without any errors.
Acceptance Criteria
-User profile API returns 200 OK when a logged in user loads the dashboard home page
-No 403 Forbidden error appears in the browser console on the dashboard home page
-Profile related data loads and displays correctly on the dashboard for all logged in users
-Authentication token is correctly included in every API request made from the dashboard
-Fix verified and tested on both desktop and mobile views
Implementation Details
-Identify why the user profile API endpoint at mulearn.org/api/v1/d..ile/user-profile/ is returning 403 Forbidden for a logged in user
-Check whether the authentication token is being correctly attached to the API request headers on the frontend
-Check the backend permission classes in the Django REST Framework view to ensure logged in users are allowed to access their own profile data
-If the token is missing or expired on the frontend fix the token refresh logic in React to ensure a valid token is always sent with every API request
-Use Django REST Framework's IsAuthenticated permission class correctly on the user profile view
Mockups / Wireframes
[Include links to any visual aids, mockups, wireframes, or diagrams that help illustrate what the final product should look like. This is not always necessary, but can be very helpful in many cases.]
[Please note that the below section of the ticket has to be in the format as mentioned as it is key to enabling proper listing of the project. Please only choose the options mentioned under the headings wherever applicable.]
Product Name
µLearn
Project Name
[Project Name: Descriptive of the ticket]
Tech Skills Needed:
Python · Django REST Framework · React.js · JWT Authentication · API Debugging
Mentor(s)
[@Mentor1] [@mentor2] [@Mentor3]
Complexity
[High]
Category
Pick one or more of [Security], [Bug],
Sub Category
Pick one or more of [API] [Backend] [Authentication]