Clear session when retrying background auth failures with an updated request. The same session may be re-obtained from the fetcher service, if the fetcher service is available, but otherwise it's not safe to assume that the session remains valid. Also clear a session in the session delegate when we're told it's invalid, and debug log that that happened. Make the retry for background auth failures use the normal retry path, so the client can inspect and potentially cancel it. Since I don't want to add Forbidden as a default auth failure status, the method that decides to retry now has a parameter for it to be "forced" to assume a retry (unless the callback changes that to no.) Since this is uniquely a background fetch case, we don't have a specific unit test to cover these code paths, so this is a bit speculative.
Clear session when retrying background auth failures with an updated request. The same session may be re-obtained from the fetcher service, if the fetcher service is available, but otherwise it's not safe to assume that the session remains valid.
Also clear a session in the session delegate when we're told it's invalid, and debug log that that happened.
Make the retry for background auth failures use the normal retry path, so the client can inspect and potentially cancel it. Since I don't want to add Forbidden as a default auth failure status, the method that decides to retry now has a parameter for it to be "forced" to assume a retry (unless the callback changes that to no.)
Since this is uniquely a background fetch case, we don't have a specific unit test to cover these code paths, so this is a bit speculative.

thomasvl/gtm-session-fetcher,google/gtm-session-fetcher,thomasvl/gtm-session-fetcher,google/gtm-session-fetcher,thomasvl/gtm-session-fetcher,google/gtm-session-fetcher