title: How to get out of this token authenticator Hilt dependency cycle?
body: <p>I have a function that returns an API, which needs an OkHttpClient instance</p>
  <pre><code>@Module
  @InstallIn(ApplicationComponent::class)
  object AuthNetworkModule {
  
      @Provides
      fun provideAuthRetrofitService (@AuthQualifier okHttpClient: OkHttpClient): IQuipsAuth{
          return Retrofit.Builder()
                  .baseUrl(&quot;${Config.BASE_URL}/&quot;)
                  .client(okHttpClient)
                  .addConverterFactory(GsonConverterFactory.create(GsonBuilder().setLenient().create()))
                  .build().create(IQuipsAuth::class.java)
      }
  </code></pre>
  <p>And I also have a function that returns an OkHttpClient that needs an API instance for the authenticator, what do I do?</p>
  <pre><code>    @Provides
      @AuthQualifier
      fun provideOkHttpClient (application: Application,  iQuipsAuth: IQuipsAuth): OkHttpClient {
          val interceptor = HttpLoggingInterceptor(object : HttpLoggingInterceptor.Logger {
              override fun log(message: String) {
                  Log.d(&quot;HttpLoggingInterceptor&quot;, message)
              }
          }).setLevel(HttpLoggingInterceptor.Level.HEADERS)
  
          return OkHttpClient.Builder()
                  .readTimeout(180, TimeUnit.SECONDS)
                  .writeTimeout(45, TimeUnit.SECONDS)
                  .hostnameVerifier { _: String?, _: SSLSession? -&gt; true }
                  .addInterceptor(interceptor)
                  .addInterceptor(AccessTokenInterceptor(application, iQuipsAuth))
                  .authenticator(AccessTokenAuthenticator(application, iQuipsAuth))
                  .build()
  
      }
  }
  </code></pre>
  <p>I am trying to recreate this same Koin code in Hilt:</p>
  <pre><code>single {
          val interceptor = HttpLoggingInterceptor(object : HttpLoggingInterceptor.Logger {
              override fun log(message: String) {
                  Log.d(&quot;HttpLoggingInterceptor&quot;, message)
              }
          }).setLevel(HttpLoggingInterceptor.Level.BODY)
  
          val okHttpClient = OkHttpClient.Builder()
              .readTimeout(180, TimeUnit.SECONDS)
              .writeTimeout(45, TimeUnit.SECONDS)
              .hostnameVerifier { _: String?, _: SSLSession? -&gt; true }
              .addInterceptor(interceptor)
              .build()
  
  
          val retrofit = Retrofit.Builder()
              .baseUrl(&quot;${Config.baseUrl}/&quot;)
              .client(okHttpClient)
              .addConverterFactory(GsonConverterFactory.create(get()))
              .addCallAdapterFactory(RxJavaCallAdapterFactory.create())
              .build()
  
          retrofit.create(IQuipsAuth::class.java)
      }
  </code></pre>