So, I have an AuthManager class which uses DataSto...
# android
d
So, I have an AuthManager class which uses DataStore to store logged in profile information such as user_id and id_token (jwt). I use this information in my OkHttp interceptor which replaces request.url to to a url chosen based on the worker id. I have multiple servers and based on user_id info, server is chosen. Currently my repositories and sync-workers also use this AuthManager to access the loggedin user info. But as you see, this is highly coupled. My I want to pass these information as params to repo-functions, in a bundle to worker and haven't yet been able to figure out how to the interceptors (maybe header as this is sent to server as well). But is this good approach? Where should my AuthManager should reside, data or ui layer?
😶 1