642d1c8477
Use in-flight cache for token retrieval and token validity checks, and centralize cache clearing on auth errors to avoid reusing invalid credentials while still allowing retries after transient failures.