My company is creating it’s own auth library, so t...
# android
s
My company is creating it’s own auth library, so that we can share auth across all our apps. I’m writing it. The library has it’s public api exposed in a single interface
CompanyAuth
, that can be created via the function
CompanyAuth()
. Sometimes the API launches into an
Activity
to refresh the login, where I need to get a hold of the same
CompanyAuth
instance to call some methods on it.
CompanyAuth
holds shared state, coroutines etc, and is in no way
Parcelable
. This is a peculiar situation that I haven’t ever encountered yet, and all the solutions I’ve come up with are hacky, or somehow involve removing
CompanyAuth
as an
interface
, and making it an
object
, which I’m also not happy with. Does anyone have any suggestions?