[Feat] #123 - 자동로그인 구현 #124
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🌱 작업한 내용
자동 로그인 및 토큰 갱신 플로우
🌱 PR Point
이렇게 사용하면 됩니다. (기존 코드들은 싹 다 수정했기 때문에 건들 필요 없습니다.)
사실 싱글톤 패턴은 가능하면 지양하는 것이 좋습니다. 관련 내용들은 한번 검색해보면 좋을거에요. 그럼에도 사용한 이유는 현재 같은 Provider들이 뷰컨 마다 중복되어 선언되어 있었고, 이번에 토큰 갱신을 위해 Interceptor를 추가하면서 Provider를 한곳에서 관리하는 것이 좋을 것 같다고 생각해서 싱글톤을 사용했습니댜. 싱글톤을 피하고 의존성 주입을 통해 이러한 문제를 해결하는 것이 더 좋은 방향이지만 그렇게 하면 러닝커브가 높아집니다. 의존성 주입에 대해서도 공부해보면 좋을거에요!
디자인분들이 코스 발견의 + 버튼을 업로드하기 버튼으로 바꿔달라고 요청해서 이 작업도 살짝 추가해서 했습니다.
직접 본인 기기에 설치해서 로그인도 해보고 자주 들어가서 테스트 해봐주세요! 토큰 갱신이 잘 되는지 확인해봅시다~~!
📸 스크린샷
📮 관련 이슈