Request Interceptor: Added a request interceptor in api.ts to automatically attach the Authorization: Bearer <accessToken> header from localStorage to all API calls.
Response Interceptor: Updated the 401 Unauthorized interceptor to retrieve the refreshToken from localStorage and send it in the request body for token renewal, saving the newly returned tokens back into localStorage.
Auth Context Updates: Modified login, logout, and changePassword in AuthContext.tsx to handle saving and clearing accessToken and refreshToken in localStorage.
Check out, review, and merge locally
Step 1.
Fetch and check out the branch for this merge request