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

[FEAT] 토큰 재발급 / 로그아웃 / 회원 탈퇴 기능 구현 #4

Open
wants to merge 10 commits into
base: feat/#1
Choose a base branch
from

Conversation

gahyuun
Copy link
Contributor

@gahyuun gahyuun commented Feb 12, 2025

💡 Issue

📸 Screenshot

image

📄 Description

1. 로그인

login 시 캐시에 refreshToken, memberId를 key,value로 저장합니다

2. 로그아웃

로그아웃 시에는 access token 과 refresh token을 전달 받습니다

  1. access token에서 추출한 memberId와 cache에 refreshToken과 같이 저장된 memberId가 일치하지 않으면 오류를 반환합니다.
  2. refreshToken이 cache에 저장되어있는지 확인하고 삭제를 합니다!

3. 재발급

  1. refresh token이 캐시에 존재하는지 확인, 캐시에 저장된 memberId가 DB에도 존재하는지 확인합니다
  2. accessToken의 memberId와 캐시에 존재하는 memberId가 일치하는지 확인합니다
  3. 이후 기존 존재하는 refreshToken을 삭제하고 accessToken,refreshToken 새롭게 발급합니다

4. 회원 탈퇴

멤버 객체가 존재하면 삭제하고, withdrawal_reason에 저장합니다!
해당 테이블은 단순히 한 번 데이터를 저장하기 위한 목적이므로 따로 도메인 엔티티를 구현하진 않았습니다 Mapper도요!

@gahyuun gahyuun added the ✨ FEAT 새로운 기능 추가 label Feb 12, 2025
@gahyuun gahyuun self-assigned this Feb 12, 2025
@gahyuun gahyuun requested a review from ckkim817 as a code owner February 12, 2025 17:02
@gahyuun gahyuun added the size/L label Feb 12, 2025
@ckkim817 ckkim817 changed the base branch from develop to feat/#1 February 13, 2025 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ FEAT 새로운 기능 추가 size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEAT] 리프레시 토큰 재발급 및 로그아웃 기능 구현
1 participant