Skip to content

Commit 646d7af

Browse files
committed
Fix token expiration date encoding
1 parent 3465b39 commit 646d7af

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Sources/Twift+Authentication.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ public struct OAuth2User: Codable {
317317
var container = encoder.container(keyedBy: CodingKeys.self)
318318
try container.encode(accessToken, forKey: .accessToken)
319319
try container.encodeIfPresent(refreshToken, forKey: .refreshToken)
320-
try container.encode(Date.now.distance(to: expiresAt), forKey: .expiresAt)
320+
try container.encode(expiresAt, forKey: .expiresAt)
321321
try container.encodeIfPresent(clientId, forKey: .clientId)
322322

323323
let scopes = scope.map(\.rawValue).joined(separator: " ")

0 commit comments

Comments
 (0)