I'm currently stucked planning my architecture (MVVM) and flow for the next app.
I want the User to tap 'log in' button to get token from api. Then token is used to authorize some of api calls.
I'd like to store token in AuthService (singleton) class, but to do that I have to inject my ApiService (singleton) to AuthService to make first login request.
Then I need the token back in ApiService injected from AuthService to be able to make authorized requests. The problem is that both ApiService and AuthService depend on each other (I'd like to avoid creating another Volley instance in AuthService just to make one-time get token request - prefer making requests using ApiService only).
The qestion is... how should I go with it? What is the pro-way of solving problem like this one? Any hints much appreciated!