2.0.0
What's Changed
On top of bug fixes, dependency updates and general performance improvement, this release adds two major features.
OAuth
OAuth support is the future of authentication for Bluesky/ATProtocol. Documentation is available here.
IMPORTANT
In order to support OAuth, I had to introduce breaking changes for the current authentication paths. While the original endpoints for authentication are still available, they will no longer automatically log you in during a session, and have been set as Obsolete. To continue logging in with App Passwords, use protocol.AuthenticateWithPasswordAsync
. For most workflows this should be a drop in replacement.
Jetstream
Jetstream is a new way of accessing the ATProtocol Firehose, using Websockets to send back JSON objects instead of CBORs. This makes it far easier to consume. Setting it up is similar to the Firehose.
var debugLog = new DebugLoggerProvider();
// You can set a custom url with WithInstanceUrl
var jetstreamBuilder = new ATJetStreamBuilder()
.WithLogger(debugLog.CreateLogger("FishyFlipDebug"));
var atWebProtocol = jetstreamBuilder.Build();
atWebProtocol.OnConnectionUpdated += (sender, args) =>
{
Console.WriteLine($"Connection Updated: {args.State}");
};
atWebProtocol.OnRecordReceived += (sender, args) =>
{
Console.WriteLine($"Record Received: {args.Record.Type}");
};
await atWebProtocol.ConnectAsync();
var key = Console.ReadKey();
await atWebProtocol.CloseAsync();
In many cases, you may be able to switch to Jetstream as a drop in replacement for existing Firehose, while accessing more of the object types exposed.
Full Changelog: v1.8.80...2.0.0