failsafe icon indicating copy to clipboard operation
failsafe copied to clipboard

Failsafe okhttp integration causes issues with BearerAuth and outdated tokens

Open shauser opened this issue 1 year ago • 0 comments

When using HttpBearerAuth with any type of expiring / non-reusable tokens the default setup as documented on https://failsafe.dev/okhttp/ causes issues: It can happen that a circuit breaker or retry policy causes enough delay for the token to expire.

It seems that the only way to address this right now is to check for status 401 and then re-create the call and executor, which causes the retry policy to be reset.

shauser avatar Jun 04 '24 09:06 shauser