2FA (추가 인증) 기능 추가:

- Step-up 인증 Interceptor 및 보호 경로 관리 로직 도입
- 2FA 팝업 모듈 및 스타일(SASS, JS) 추가
- 로그인 실패 사유 Enum 및 2FA 관련 처리 로직 공통화
This commit is contained in:
Rinjae
2026-07-27 20:12:13 +09:00
parent 41be827b81
commit b5ffa69eba
43 changed files with 2672 additions and 553 deletions
@@ -244,6 +244,25 @@
}
});
// 로그인 2FA: 1차 인증 통과 후 pending 상태면 추가 인증 팝업 자동 오픈
var twoFactorPending = [[${twoFactorPending}]];
if (twoFactorPending && typeof TwoFactorAuth !== 'undefined') {
TwoFactorAuth.open({
mode: 'login',
onSuccess: function (res) {
window.location.href = (res && res.redirect) ? res.redirect : /*[[@{/}]]*/ '/';
},
onCancel: function (reason) {
// 팝업 닫기/타임아웃/실패 = 2차 인증 실패 → 로그인 페이지 유지 후 재로그인 안내
if (reason === 'TIMEOUT') {
customPopups.showAlert('인증 시간이 초과되어 로그인이 취소되었습니다. 다시 로그인해주세요.');
} else if (reason !== 'FAILED') {
customPopups.showAlert('추가 인증이 취소되었습니다. 다시 로그인해주세요.');
}
}
});
}
fnInit();
});
</script>