mirror of
https://github.com/google/nomulus.git
synced 2025-05-14 16:37:13 +02:00
Reduce OAuth token cache time to 30min
It seems that even though the token is supposed to be valid for 60min, in practice it expires before that. Reducing caching time to 30min solves the problem (at least as far as I can tell). This should not increase too much load as we are only calling the API twice an hour instead of once. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=186830395
This commit is contained in:
parent
21313bffda
commit
f96a0b7da9
1 changed files with 6 additions and 2 deletions
|
@ -20,11 +20,15 @@ gcpScopes:
|
|||
# to authenticate.
|
||||
- https://www.googleapis.com/auth/userinfo.email
|
||||
|
||||
# Access token is valid for 60 minutes.
|
||||
# Access token is valid for 30 minutes.
|
||||
#
|
||||
# Document says that the token should be good for 60 minutes, but in practice
|
||||
# we've run into problems with token becoming invalid before supposed expiration
|
||||
# time. 30 minutes seems to be a good compromise which guarantees token validity
|
||||
# without making many more API calls to the OAuth server.
|
||||
# See also: Data store
|
||||
# (https://developers.google.com/api-client-library/java/google-api-java-client/oauth2#data_store).
|
||||
accessTokenValidPeriodSeconds: 3600
|
||||
accessTokenValidPeriodSeconds: 1800
|
||||
|
||||
# Access token is refreshed 1 minutes before expiry.
|
||||
#
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue