Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

사용자 인증절차 강화 #47

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open

Conversation

Ryu-02
Copy link
Collaborator

@Ryu-02 Ryu-02 commented Feb 28, 2025

관련 이슈
-사용자 인증절차 강화

📝 제목

  • 사용자 인증절차 강화

📋 작업 내용

  • session DB를 통하여 인증 후 이용가능

console.log(req.sessionID);
if (req.session && req.session.user) {
// 세션 ID를 사용하여 DB에서 세션 정보 조회
const isSessionValid = await userStorage.getSessionInfo(req.sessionID);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

엇 sessions 테이블을 새로 만드신건가요??

찾아보니까 명규님이 말씀하신대로 DB에 세션 정보 저장을 안해도 된다고 봐서요 !

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

session 테이블은 mysql-session 사용을 하면 자동으로 테이블이 생성되고, app.js에서 설정한 대로 db에 자동으로 들어가고 만료되면 사라지는 구조로 자동 생성 되는걸로 알고있습니다 !

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

와우 그런 구조가 ... 신기하네요 !!
알겠습니다 ~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants