Android Oauth2 token refresh mechanism - OkHttp vs RxJava layering

The RxJava approach I am currently working on an app where the devs before me took this strange decision in regard to the refresh token mechanism - have a single entry point of the app which is called every time whenever you need to have a fresh token. What I mean is this:

February 12, 2021 · 5 min · gmirchev90

Retrofit – Authorization & Expiring Tokens

Situation is like this: You got an AccessToken and RefreshToken (AT and RT for now on) Every API call needs to contain the AT When the AT expires you need to refresh it using your RT

May 4, 2020 · 2 min · gmirchev90