Skip to content

Commit

Permalink
Fix: 회원 가입 비밀 번호 유효성 검사 로직 수정 (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
yangjaehyuk authored Jan 24, 2024
1 parent 441d08b commit fbf2fab
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
3 changes: 1 addition & 2 deletions src/pages/users/signup/Signup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ const Signup = () => {
const res = await instance.post(`/api/auth/members/email`, {
email: email,
});
console.log(res);
if (res.data.isExists === false) {
setIsIdValid(true);
showToast({ theme: "success", message: "사용 가능한 아이디입니다" });
Expand Down Expand Up @@ -246,7 +245,7 @@ const Signup = () => {
{...register("password", {
required: "비밀번호를 입력하세요",
pattern: {
value: /^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{8,20}$/,
value: /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d).{8,20}$/,
message: "영문자, 숫자 포함 최소 8~20자로 입력하세요",
},
})}
Expand Down
1 change: 0 additions & 1 deletion src/utils/checkToken.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ export function isAccessTokenExpired(accessToken: string) {
const decodedToken = decodeAccessToken(accessToken);
const currentTime = Math.floor(Date.now() / 1000);

// return decodedToken.exp > currentTime;
return decodedToken.exp < currentTime;
}

Expand Down

0 comments on commit fbf2fab

Please sign in to comment.