cognitedata / cognite-sdk-python

Cognite Python SDK
https://cognite-sdk-python.readthedocs-hosted.com/
Apache License 2.0
77 stars 27 forks source link

Use expires_in to decide if a token should be refreshed #1602

Closed muradsater closed 7 months ago

muradsater commented 8 months ago

System information (please complete the following information):

Describe the bug When using client credentials the auth token is refreshed every 5 minutes, the expires_in property from the token-request is not used. The SDK reads a property named expires_at, but it's not a part of the RFC and not something AUTH0 and Entra return.

(most likely the case for user based flows as well)

Expected behavior Refresh token only in_leeway_seconds before it is expiring.

Screenshots Sample from an extractor, where the token has a lifetime of 24 hours.

image
haakonvt commented 7 months ago

Closing as the SDK now uses expires_in as of 7.26.2