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

M3-286 FCM 토큰 관리기능 서버 구현 #60

Merged
merged 11 commits into from
Aug 8, 2024

Conversation

koomin1227
Copy link
Member

작업 내용*

  • fcm token 등록 api 구현
  • 회원 탈퇴시 기존 등록 된 토큰도 삭제 하도록 구현

고민한 내용*

토큰 관리

  • fcm 공식 문서를 보면 권장사항 나와있다.

주요 권장사항

  • 서버에 등록 토큰을 저장합니다.
  • 서버에 토큰 타임스탬프를 구현하고 토큰이 변경될때 타임스탬프를 정기적으로 업데이트
  • 업데이트 된지 2달된 토큰은 비활성화된 유저일 확률이 크기에 삭제
  • 정기적으로 토큰 업데이트
  • 푸시 알림후 응답이 잘못되면 토큰 삭제

등이 권장사항으로 적혀있다.

  • 그래서 나는 FcmToken 테이블을 만들어서 user_id, token, modified_at 을 저장하게 했다.
  • modified_at 이 타임스탬프이며 업데이트 가능하다.
  • 앱이 켜질 때 마다토큰을 서버에 전송하게 했기에 정기적 토큰 업데이트도 만족한다.

아직 미구현 부분

  • 업데이트 된지 2달된 토큰은 배치 서버에서 지우는 것이 적합하여 보여 작업하지 않았다.
  • 푸시 알림 후 응답이 잘못된 경우는 아직 푸시 알림을 전송하는 코드가 없어서 구현하지 않았다.

리뷰 요구사항

  • 리뷰할 때 중점적으로 봐줬으면 하는 내용들

스크린샷

@koomin1227 koomin1227 requested review from qjvk2880 and tkdals802 and removed request for qjvk2880 August 8, 2024 09:08
@koomin1227 koomin1227 self-assigned this Aug 8, 2024
Copy link

github-actions bot commented Aug 8, 2024

Qodana for JVM

It seems all right 👌

No new problems were found according to the checks applied

💡 Qodana analysis was run in the pull request mode: only the changed files were checked
☁️ View the detailed Qodana report

Contact Qodana team

Contact us at [email protected]

Copy link

github-actions bot commented Aug 8, 2024

📝 테스트 커버리지 리포트

Overall Project 72.13% -0.4% 🍏
Files changed 92.5% 🍏

File Coverage
FcmService.java 100% 🍏
RankingService.java 94.18% 🍏
UserService.java 89.73% 🍏
PixelService.java 75.3% -0.9%
UserController.java 25% -16.67%

@koomin1227 koomin1227 merged commit ab4adf1 into develop Aug 8, 2024
3 checks passed
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.

3 participants