You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When JWTRequestsAuthenticator is instantiated it instantiates a JWT object that in turn creates a payload set with an expirationTime = Date().addingTimeInterval(expireDuration).timeIntervalSince1970.
The expirationTime is thus constant. When JWTRequestsAuthenticator renews the cachedToken, the new token is created with the original expirationTime which makes the jwt token invalid.
The text was updated successfully, but these errors were encountered:
How to reproduce:
APIProvider
and call any request.Why it happens:
APIProvider
holds a reference toJWTRequestsAuthenticator
instance that manages requests authorization.appstoreconnect-swift-sdk/Sources/APIProvider.swift
Line 104 in 58ab933
When
JWTRequestsAuthenticator
is instantiated it instantiates aJWT
object that in turn creates apayload
set with anexpirationTime = Date().addingTimeInterval(expireDuration).timeIntervalSince1970
.appstoreconnect-swift-sdk/Sources/JWT/JWTRequestsAuthenticator.swift
Line 21 in 58ab933
appstoreconnect-swift-sdk/Sources/JWT/JWT.swift
Lines 97 to 99 in 58ab933
The
expirationTime
is thus constant. WhenJWTRequestsAuthenticator
renews thecachedToken
, the new token is created with the originalexpirationTime
which makes the jwt token invalid.The text was updated successfully, but these errors were encountered: