Address code review: remove JWT secret exports and clarify incomplete refresh implementation

Co-authored-by: alexpolo1 <14327609+alexpolo1@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-01-06 07:27:17 +00:00
parent bf2288c1a0
commit 8d0e7c159d
2 changed files with 4 additions and 3 deletions

View File

@@ -110,7 +110,5 @@ module.exports = {
verifyToken,
generateAccessToken,
generateRefreshToken,
verifyRefreshToken,
JWT_ACCESS_SECRET,
JWT_REFRESH_SECRET
verifyRefreshToken
};

View File

@@ -51,6 +51,9 @@ export const AuthProvider = ({ children }) => {
try {
// Call refresh endpoint WITHOUT sending refreshToken in body
// Server should read refresh token from HttpOnly cookie
// NOTE: This implementation is incomplete - backend does not yet support
// HttpOnly cookie-based refresh. This will fail until backend is updated.
// See TODO items in PR description for follow-up work required.
const response = await axios.post(`${API_BASE_URL}/api/auth/refresh`, {}, {
withCredentials: true // Important: send cookies with request
});