암호 키 등록 후 Refresh Token 업그레이드 구현

This commit is contained in:
static
2024-12-29 01:55:01 +09:00
parent af51f04b94
commit 516375142d
7 changed files with 77 additions and 4 deletions

View File

@@ -41,7 +41,7 @@ export const authenticate = (cookies: Cookies) => {
error(401, "Access token not found");
}
const tokenPayload = verifyToken(accessToken);
const tokenPayload = verifyToken(accessToken.trim());
if (tokenPayload === TokenError.EXPIRED) {
error(401, "Access token expired");
} else if (tokenPayload === TokenError.INVALID || tokenPayload.type !== "access") {