Skip to content

Commit

Permalink
Fix refresh token validation
Browse files Browse the repository at this point in the history
  • Loading branch information
hiteshchoudhary committed Dec 19, 2023
1 parent 0277c88 commit 4c3de94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/controllers/user.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ const logoutUser = asyncHandler(async(req, res) => {
const refreshAccessToken = asyncHandler(async (req, res) => {
const incomingRefreshToken = req.cookies.refreshToken || req.body.refreshToken

if (incomingRefreshToken) {
if (!incomingRefreshToken) {
throw new ApiError(401, "unauthorized request")
}

Expand Down

0 comments on commit 4c3de94

Please sign in to comment.