We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fc7ac07 commit 7749f2bCopy full SHA for 7749f2b
Sources/XKit/DeveloperServices/OpenAPI/ASCKey.swift
@@ -16,7 +16,10 @@ public struct ASCKey: Sendable {
16
actor ASCJWTGenerator {
17
// the duration for which we generate JWTs.
18
// ASC allows a maximum of 20 minutes.
19
- private static let ttl: TimeInterval = 60 * 20
+ //
20
+ // Apple sometimes rounds up, causing the expiry to go over 20 seconds.
21
+ // This leads to an invalid token.
22
+ private static let ttl: TimeInterval = 60 * 19
23
24
// the minimum remaining ttl for us to consider reusing a previous key.
25
// that is, we reuse the last JWT if it has at least [threshold] seconds
0 commit comments