https://kotlinlang.org logo
#android-architecture
Title
# android-architecture
u

ursus

02/07/2019, 6:27 PM
hm I wonder if okhttp Authenticator can even handle such case, afaik the return value is request to retry, and null to pass 401 downstream
d

dewildte

02/07/2019, 10:35 PM
If the user can not get the token from a refresh then they are not authenticated and therefore not allowed to do things that require authentication? No network, no token, no fun.
u

ursus

02/07/2019, 11:24 PM
But, the were not refused a token, jsut network failed, if you then show network error to the ui, user can retry
and maybe then it will go through, without logging in again
d

dewildte

02/07/2019, 11:28 PM
But if the retry fails is what you were talking about, correct?
u

ursus

02/08/2019, 12:06 AM
yes, but retry requiest fails on network, not 400/500 etc
what I mean is that .. I NEVER see a relogin screen on slack/twitter etc big apps, and surely have seen "failed to load" errors -- is it just coincidence?
j

joelpedraza

02/08/2019, 6:07 PM
We’re using grpc and I had to implement auth retry logic. I went with passing IO error downstream.
u

ursus

02/08/2019, 7:54 PM
Yea I think its right thing to do
5 Views