File tree Expand file tree Collapse file tree
core/network/src/main/java/com/moneymong/moneymong/network/util Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ package com.moneymong.moneymong.network.util
22
33import com.moneymong.moneymong.domain.repository.TokenRepository
44import com.moneymong.moneymong.network.BuildConfig
5- import kotlinx.coroutines.flow.SharedFlow
65import kotlinx.coroutines.runBlocking
76import okhttp3.Authenticator
87import okhttp3.Request
@@ -20,7 +19,6 @@ class MoneyMongTokenAuthenticator @Inject constructor(
2019 if (response.code == 401 && ! isPathRefresh) {
2120 return runBlocking {
2221 var newRequest: Request ? = null
23- // 로컬에서 리프레쉬 토큰 가져오기
2422 tokenRepository.getRefreshToken().onSuccess {
2523 tokenRepository.getUpdateToken(it)
2624 .onSuccess { token ->
@@ -39,23 +37,15 @@ class MoneyMongTokenAuthenticator @Inject constructor(
3937 }
4038 }
4139 .onFailure {
42- // it
43- // TODO 토큰 갱신 요청이 실패하거나 네트워크 문제 등으로 인해 갱신 되지 않았을 떄
44- // 에러 화면
45- }
46- }
47- .onFailure {
48- // it
49- // 로컬에서 리프레쉬 토큰을 가져오지 못한 경우
5040 runBlocking {
5141 tokenRepository.notifyTokenUpdateFailed(true )
5242 }
5343 }
5444 }.onFailure {
55- runBlocking {
56- tokenRepository.notifyTokenUpdateFailed(true )
57- }
45+ runBlocking {
46+ tokenRepository.notifyTokenUpdateFailed(true )
5847 }
48+ }
5949 newRequest
6050 }
6151 } else {
You can’t perform that action at this time.
0 commit comments