Hi, How can we update a singleton component if we ...
# dagger
p
Hi, How can we update a singleton component if we have any param changes to be applied to any given @provides method using Hilt dependency injection? Since Singleton components are initialised initially itself and if we have to update any keys to the
certificatePinner
etc (if we are setting keys dynamically and not locally) how do we achieve the same with Hilt? Ref: Similar use case to this issue
d
Is
OauthInterceptor
is your implementation? If so instead of injecting concrete keys into
OauthInterceptor
you need to inject a class that will provide latest value whenever requested. Something like:
Copy code
interface KeyProvider {
   fun provide(): String
}
281 Views