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] 로그인, 로그아웃, 토큰 재발급 #12

Merged
merged 26 commits into from
Sep 10, 2024

Conversation

heejjinkim
Copy link
Collaborator

@heejjinkim heejjinkim commented Sep 7, 2024

✏️ Description

  • JWT 관련 추가
  • Redis 설정 추가(refresh token 관리)
  • 로그인, 로그아웃, 토큰 재발급 api 구현
  • 토큰 재발급: 만료된 accessToken과 refreshToken을 받아 두 토큰 모두 재발급
  • 로그아웃: Redis에 저장된 refreshToken 삭제(클라이언트 측에서 저장하고 있던 accessToken 삭제)

🙏🏻 To Reviewers

  • 보통 유저 인증 시, Subject 값으로 email을 많이 사용하는데 저희는 일단 Id를 사용하는 것을 구현했었어요. 근데 하다보니, Subject 값이 String 타입이어야 해서 Long 타입인 Id를 매번 toString(), Long.valueOf() 를 써서 타입을 매번 변경해야하더라구요..? 그래서 Subject 값으로 String 타입인 providerId(소셜 서버 ID)를 쓰는 걸로 바꿀까 생각이 들었는데 어떻게 생각하시나요?!
  • 추가하거나 수정할 거 있으면 말씀해주세요!

💡 Issue Number

heejjinkim and others added 24 commits September 3, 2024 18:10
security, jwt, feign, redis
related to: #11
nullable false로 하면 createdAt과 updatedAt이 자동 삽입 안 되는 문제 발생
토큰, provder 관련 error code 추가
feign exception handler 추가
related to: #11
feign, redis, security 설정
related to: #11
추후에 삭제 예정

related to: #11
추후에 쓰지 않을 코드 관련이라 삭제

related to: #11
로그인 시, refresh token 저장 로직도 추가
related to: #11
@heejjinkim heejjinkim requested a review from minje0204 September 7, 2024 03:40
Copy link
Collaborator

@minje0204 minje0204 left a comment

Choose a reason for hiding this comment

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

수고 많으셨습니다~!

@minje0204
Copy link
Collaborator

보통 유저 인증 시, Subject 값으로 email을 많이 사용하는데 저희는 일단 Id를 사용하는 것을 구현했었어요. 근데 하다보니, Subject 값이 String 타입이어야 해서 Long 타입인 Id를 매번 toString(), Long.valueOf() 를 써서 타입을 매번 변경해야하더라구요..? 그래서 Subject 값으로 String 타입인 providerId(소셜 서버 ID)를 쓰는 걸로 바꿀까 생각이 들었는데 어떻게 생각하시나요?!

providerId 사용해도 괜찮을 것 같아요~!
나중에 새로운 플랫폼이 추가할때 고려만 하면 되겠네요

@heejjinkim heejjinkim self-assigned this Sep 7, 2024
providerId 인덱스도 추가

related to: #11
@heejjinkim heejjinkim merged commit d398159 into develop Sep 10, 2024
1 check passed
@heejjinkim heejjinkim added the ✨ feature New feature or request label Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants