Make the OAuth token response scope optional — the spec allows omitting it and a Feedly refresh response without it would fail decoding and permanently break sync.

This commit is contained in:
Brent Simmons committed 2026-08-03 14:44:12 -07:00
1 parent 60edd4b96e
commit 3fcdee6825
2 files changed
+6 -3

No files matched your search

@@ -17,12 +17,15 @@ nonisolated public struct FeedlyOAuthAccessTokenResponse: Decodable, OAuthAccess
/// The ID of the Feedly user.
public let id: String
// Required properties of the OAuth 2.0 Authorization Framework section 4.1.4.
// Properties of the OAuth 2.0 Authorization Framework section 4.1.4.
public let accessToken: String
public let tokenType: String
public let expiresIn: Int
public let refreshToken: String?
public let scope: String
// Optional per RFC 6749 §5.1, and Feedly’s refresh response omits it — a non-optional
// declaration made every token refresh fail decoding, permanently breaking sync.
public let scope: String?
}
extension FeedlyAccountDelegate: OAuthAuthorizationGranting {
@@ -136,7 +136,7 @@ public protocol OAuthAccessTokenResponse {
var tokenType: String { get }
var expiresIn: Int { get }
var refreshToken: String? { get }
var scope: String { get }
var scope: String? { get }
}
/// The access and refresh tokens from a successful authorization grant.