The work I'm doing on invalidating tokens with adminGlobalUserSignOut means we could start getting 401s and needing to refresh a token even when it's not expired. Currently, when that happens, we get into a loop because this code expects to only remove it from storage when it's expired. This fixes that to ensure it's removed immediately on refresh failure instead of yielding the old token from storage.
The work I'm doing on invalidating tokens with
adminGlobalUserSignOut
means we could start getting 401s and needing to refresh a token even when it's not expired. Currently, when that happens, we get into a loop because this code expects to only remove it from storage when it's expired. This fixes that to ensure it's removed immediately on refresh failure instead of yielding the old token from storage.