How to handle auth0 403 error without adding specific code everywhere (Retrofit/okhttp/RxAndroid)
问题 I am using Auth0, which gives me a JWT (json web token) and a refreshtoken. I use this JWT in the http headers to communicate with my backend. It could happen, that the server gives me a 403 , when it decides that the JWT has expired. In this event, I can ask Auth0 to issue me a new JWT, using the refreshtoken. It means I call the Auth0 backend, pass it the refreshtoken, and it gives me a new JWT, which I can then use in my requests. My question is, how can I efficiently write this behaviour