spaceship/lib/spaceship/connect_api/token.rb in fastlane-2.205.2 vs spaceship/lib/spaceship/connect_api/token.rb in fastlane-2.206.0
- old
+ new
@@ -88,17 +88,20 @@
refresh!
end
def refresh!
- @expiration = Time.now + @duration
+ now = Time.now
+ @expiration = now + @duration
header = {
- kid: key_id
+ kid: key_id,
+ typ: 'JWT'
}
payload = {
iss: issuer_id,
+ iat: now.to_i,
exp: @expiration.to_i,
aud: 'appstoreconnect-v1'
}
@text = JWT.encode(payload, @key, 'ES256', header)