diff --git a/Modules/Account/Sources/Account/Feedly/FeedlyAccountDelegate+OAuth.swift b/Modules/Account/Sources/Account/Feedly/FeedlyAccountDelegate+OAuth.swift index 414d69a3d..7a729ea24 100644 --- a/Modules/Account/Sources/Account/Feedly/FeedlyAccountDelegate+OAuth.swift +++ b/Modules/Account/Sources/Account/Feedly/FeedlyAccountDelegate+OAuth.swift @@ -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 { diff --git a/Modules/Account/Sources/Account/Feedly/OAuthAuthorizationCodeGranting.swift b/Modules/Account/Sources/Account/Feedly/OAuthAuthorizationCodeGranting.swift index 231a396e5..cfaf47ccd 100644 --- a/Modules/Account/Sources/Account/Feedly/OAuthAuthorizationCodeGranting.swift +++ b/Modules/Account/Sources/Account/Feedly/OAuthAuthorizationCodeGranting.swift @@ -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.