I'm implementing the login fragment of a new app. And I'm dealing with the issue of saving the access token somewhere to use it for every call in the app.
I was wondering where I should save it. Should I use shared preferences as usual or I should use in a way I don't know the viewModel in order to store that token there?
The problem is that if I store the accessToken in the LoginViewModel, I would need to call that viewModel in every views where I'll need the accessToken. It doesn't seem the best option.
Any idea? Thank you