v0.34.0
Version 0.34.0 includes the following changes:
New Feature:
- Added beta support for integrating OAuth sessions with ATProtoKit.
- Added
ATOAuthSessionConfigurationfor connecting an app-owned OAuth implementation to ATProtoKit. - Added
ATProtoKit.createOAuthSession()for creating an OAuth-backed ATProtoKit session. - Added support for externally managed authorization, additional authorization headers, DPoP, granted scope validation, and custom request execution.
- Added DocC articles covering OAuth integration and a complete implementation walkthrough.
- As this feature is currently in beta, its API may change based on testing and feedback.
- Added
Changes:
- Reworked authentication and credential storage.
- This is a source-breaking update.
- Replaced
SecureKeychainProtocolwith the newATCredentialStoreprotocol. ATProtocolConfigurationnow manages the session identifier and keeps short-lived access tokens in memory.- Existing App Password and refresh token values stored in Apple Keychain can be preserved by reusing the previous service name and session identifier.
- A migration article is now available in the DocC.
- Split the responsibilities of
SessionConfigurationinto smaller authentication and session capability protocols.- Added separate capabilities for App Password authentication, credential storage, account creation, OAuth synchronization, and user session registration.
- Updated authenticated API requests to receive authorization from the active session configuration.
- Implementations of
ATRequestExecutormust now accept anATRequestAuthorizationRequirement. - Added
ClosureATRequestExecutorfor integrations that expose request execution as a closure.
- Implementations of
- Media upload helpers in
ATProtoBlueskyno longer require callers to retrieve and pass an access token manually. - Added support for Labelers in applicable Bluesky AppView methods. (Thanks, @aaronvegh!)
- Added the optional
blobUploadLimitproperty to the server description response. (Thanks, @mcprostar205!) - Added public initializers to additional profile and lexicon definitions. (Thanks, @mcprostar205!)
- Updated media uploads to use the appropriate Content-Type value. (Thanks, @KC-2001MS!)
- Updated and expanded the unit tests for credential storage and OAuth integration.
- Updated some of the lexicon models and methods from the latest lexicon changes in bluesky-social’s atproto library. (Thanks, @mcprostar205, @KC-2001MS, and aaronvegh!)
Bug Fixes:
-
Fixed cross-PDS reply validation by retrieving reply references through the AppView. (Thanks, @aaronvegh!)
-
Fixed
getRecord()to resolve and route requests to the correct PDS. (Thanks, @KC-2001MS!) -
Fixed the request body property names and
CodingKeysused bydeleteAccount(). (Thanks, @KC-2001MS!) -
Updated
com.atproto.moderation.createReportto match the latest specification, including support for moderation tool metadata. (Thanks, @KC-2001MS!) -
Made the Labeler viewer state’s
likeURIproperty optional to match the specification. (Thanks, @mcprostar205!) -
Added the missing
labelsproperty to the applicable list view definitions. (Thanks, @mcprostar205!) -
Fixed media and blob uploads so they use the session’s authorization flow.
-
Note:
ATURIManager,DIDManager,HandleManager,NSIDManager, andRecordKeyManagerhave been removed from ATProtoKit. Please use ATSyntaxTools.
Once again, thank you for your support. Please give feedback, bug reports, and contributions if you have time. Consider starring this project if you find it helpful, and feel free to donate an amount that reflects the value it has brought to you. Your support helps ensure the continued development and improvement of this project. You can also speak to me on Bluesky (@cjrriley.ca) for any questions.