Closed lpusok closed 3 years ago
Do not regenerate tokens in each call, only if token expiry is 6 (4 + 2 cushion minutes) away. Earlier we regenerated the token if expired less than 20 minutes, and that was true every time as the original token had a 20 minute expiry. See https://developer.apple.com/documentation/appstoreconnectapi/generating_tokens_for_api_requests.
Generate initial token with 18 minutes expiry (20 - 2 cushion minutes)
Closing as another merged PR makes these changes redundant: https://github.com/bitrise-steplib/steps-ios-auto-provision-appstoreconnect/pull/60
Checklist
Context
Change token reuse logic:
Do not regenerate tokens in each call, only if token expiry is 6 (4 + 2 cushion minutes) away. Earlier we regenerated the token if expired less than 20 minutes, and that was true every time as the original token had a 20 minute expiry. See https://developer.apple.com/documentation/appstoreconnectapi/generating_tokens_for_api_requests.
Generate initial token with 18 minutes expiry (20 - 2 cushion minutes)
Changes
Investigation details
Decisions