File tree Expand file tree Collapse file tree
core/data/src/main/java/com/neki/android/core/data/remote/di Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ import io.ktor.http.HttpHeaders
3535import io.ktor.http.encodedPath
3636import io.ktor.serialization.kotlinx.json.json
3737import kotlinx.coroutines.flow.first
38+ import dagger.Lazy
3839import kotlinx.serialization.json.Json
3940import timber.log.Timber
4041import javax.inject.Singleton
@@ -62,10 +63,10 @@ internal object NetworkModule {
6263 @Provides
6364 @Singleton
6465 fun provideAuthCacheManager (
65- httpClient : HttpClient ,
66+ httpClient : Lazy < HttpClient > ,
6667 ): AuthCacheManager = object : AuthCacheManager {
6768 override fun invalidateTokenCache () {
68- httpClient.plugin(Auth ).providers
69+ httpClient.get(). plugin(Auth ).providers
6970 .filterIsInstance<BearerAuthProvider >()
7071 .firstOrNull()
7172 ?.clearToken()
You can’t perform that action at this time.
0 commit comments