Skip to content

Commit

Permalink
fix : update email auth token strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
ecsimsw committed Aug 16, 2023
1 parent 4ea9d61 commit f9b1f65
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 19 deletions.
7 changes: 1 addition & 6 deletions src/main/resources/static/js/reset-password-auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,6 @@ document.addEventListener("DOMContentLoaded", function () {
authButton.addEventListener("click", async function () {
const authCode = codeInput.value;

// 입력값이 숫자인지 확인
if (!(/^\d+$/.test(authCode))) {
authNumberResult.textContent = "숫자를 입력해주세요."; // 숫자가 아닐 경우 메시지 변경
} else {
// 인증 코드 검증 로직
const validAuthApiData = {
email: userEmail,
Expand All @@ -94,10 +90,9 @@ document.addEventListener("DOMContentLoaded", function () {
} catch (error) {
alert(error.message);
}
}
});
});

function eraseCookie(name) {
document.cookie = name + '=; Max-Age=0'
}
}
13 changes: 0 additions & 13 deletions src/main/resources/static/js/sign-up-email-auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,25 +67,13 @@ document.addEventListener("DOMContentLoaded", function () {
authNumberResult.style.color='red'
return
}
else if(!(/^\d+$/.test(codeInputData))) {
authNumberResult.textContent = "숫자를 입력해주세요."; // 숫자가 아닐 경우 메시지 변
authNumberResult.style.opacity = 1;
authNumberResult.style.color='red'
return
}
else if(codeInputData && (/^\d+$/.test(codeInputData))){
authNumberResult.style.opacity = 0;}
});



authButton.addEventListener("click", async function () {
const authCode = codeInput.value;

// 입력값이 숫자인지 확인
if (!(/^\d+$/.test(authCode))) {
authNumberResult.textContent = "숫자를 입력해주세요."; // 숫자가 아닐 경우 메시지 변경
} else {
// 인증 코드 검증 로직
const validAuthApiData = {
email: userEmail,
Expand All @@ -108,7 +96,6 @@ document.addEventListener("DOMContentLoaded", function () {
} catch (error) {
alert(error.message);
}
}
});
});

0 comments on commit f9b1f65

Please sign in to comment.