Skip to content

Commit

Permalink
Revert "fix: Update token refresh threshold from 20 seconds to 5 minu…
Browse files Browse the repository at this point in the history
…tes (#1146)" (#1153)

This reverts commit 261a561.
  • Loading branch information
clundin25 authored Sep 26, 2022
1 parent 45313ac commit 186464b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion google/auth/_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@
from six.moves import urllib


REFRESH_THRESHOLD = datetime.timedelta(seconds=300)
# Token server doesn't provide a new a token when doing refresh unless the
# token is expiring within 30 seconds, so refresh threshold should not be
# more than 30 seconds. Otherwise auth lib will send tons of refresh requests
# until 30 seconds before the expiration, and cause a spike of CPU usage.
REFRESH_THRESHOLD = datetime.timedelta(seconds=20)


def copy_docstring(source_class):
Expand Down

0 comments on commit 186464b

Please sign in to comment.