Skip to content

Commit 7749f2b

Browse files
committed
fix: resolve bearer issues
1 parent fc7ac07 commit 7749f2b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Sources/XKit/DeveloperServices/OpenAPI/ASCKey.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ public struct ASCKey: Sendable {
1616
actor ASCJWTGenerator {
1717
// the duration for which we generate JWTs.
1818
// ASC allows a maximum of 20 minutes.
19-
private static let ttl: TimeInterval = 60 * 20
19+
//
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
2023

2124
// the minimum remaining ttl for us to consider reusing a previous key.
2225
// that is, we reuse the last JWT if it has at least [threshold] seconds

0 commit comments

Comments
 (0)