CarpaNet.OAuth
1.1.0
See the version list below for details.
dotnet add package CarpaNet.OAuth --version 1.1.0
NuGet\Install-Package CarpaNet.OAuth -Version 1.1.0
<PackageReference Include="CarpaNet.OAuth" Version="1.1.0" />
<PackageVersion Include="CarpaNet.OAuth" Version="1.1.0" />
<PackageReference Include="CarpaNet.OAuth" />
paket add CarpaNet.OAuth --version 1.1.0
#r "nuget: CarpaNet.OAuth, 1.1.0"
#:package CarpaNet.OAuth@1.1.0
#addin nuget:?package=CarpaNet.OAuth&version=1.1.0
#tool nuget:?package=CarpaNet.OAuth&version=1.1.0
CarpaNet.OAuth

CarpaNet.OAuth is an OAuth library for CarpaNet.

This library is experimental and not stable. Expect issues and bugs!
OAuthSession
This is an OAuth 2.0 flow orchestrator supporting PAR (Pushed Authorization Requests), PKCE, and DPoP. Use this to produce an ATProtoOAuthClient via CallbackAsync or RestoreSessionAsync.
var config = new OAuthClientConfig
{
ClientId = clientId,
RedirectUri = redirectUri,
Scope = "atproto transition:generic",
JsonOptions = myJsonOptions,
SessionStore = mySessionStore
};
using var oauthClient = new OAuthSession(config);
var authUrl = await oauthClient.AuthorizeAsync(handle);
// ... redirect user to authUrl, receive callback ...
var session = await oauthClient.CallbackAsync(callbackUrl);
// session implements IATProtoClient
CallbackAsync validates the iss callback parameter (RFC 9207) and the token sub. The session's PDS URL is taken from the DID document of sub, also when authorization started from an entryway URL.
Scopes
Use ScopeSet (namespace CarpaNet.OAuth.Scopes) to build the scope string with the atproto permission syntax:
config.SetScope(new ScopeSet()
.AddAtproto()
.AddRepo("app.bsky.feed.post", RepoActions.Create)
.AddBlob("image/*"));
// "atproto repo:app.bsky.feed.post?action=create blob:image/*"
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-browser1.0 is compatible. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- CarpaNet (>= 1.1.0)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.5)
- System.Formats.Cbor (>= 10.0.5)
- System.Text.Json (>= 10.0.5)
-
net10.0
- CarpaNet (>= 1.1.0)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.5)
- System.Formats.Cbor (>= 10.0.5)
-
net10.0-browser1.0
- CarpaNet (>= 1.1.0)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.5)
- System.Formats.Cbor (>= 10.0.5)
-
net8.0
- CarpaNet (>= 1.1.0)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.5)
- System.Formats.Cbor (>= 10.0.5)
- System.Text.Json (>= 10.0.5)
-
net9.0
- CarpaNet (>= 1.1.0)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.5)
- System.Formats.Cbor (>= 10.0.5)
- System.Text.Json (>= 10.0.5)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on CarpaNet.OAuth:
| Package | Downloads |
|---|---|
|
Sylin.Koan.Web.Auth.Connector.Atproto
Native AT Protocol identity and authorized session connector for Koan Web Auth. |
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on CarpaNet.OAuth:
| Repository | Stars |
|---|---|
|
AvaloniaUI/Avalonia.Controls.Maui
Avalonia-based Handlers for .NET MAUI
|
| Version | Downloads | Last Updated |
|---|---|---|
| 1.2.0-alpha.3 | 49 | 10/3/2026 |
| 1.2.0-alpha.2 | 52 | 10/3/2026 |
| 1.2.0-alpha.1 | 52 | 10/3/2026 |
| 1.1.0 | 120 | 10/3/2026 |
| 1.1.0-alpha.5 | 316 | 5/21/2026 |
| 1.1.0-alpha.4 | 117 | 4/13/2026 |
| 1.1.0-alpha.3 | 95 | 4/13/2026 |
| 1.1.0-alpha.2 | 91 | 4/13/2026 |
| 1.1.0-alpha.1 | 75 | 8/21/2026 |
| 1.0.3 | 814 | 8/21/2026 |
| 1.0.2 | 414 | 5/21/2026 |
| 1.0.1 | 142 | 3/30/2026 |
| 0.1.0-alpha.76 | 83 | 3/30/2026 |
| 0.1.0-alpha.71 | 78 | 3/24/2026 |
| 0.1.0-alpha.68 | 101 | 3/15/2026 |
| 0.1.0-alpha.58 | 81 | 3/8/2026 |
| 0.1.0-alpha.54 | 86 | 2/18/2026 |
| 0.1.0-alpha.52 | 88 | 2/18/2026 |
| 0.1.0-alpha.50 | 87 | 2/18/2026 |
| 0.1.0-alpha.47 | 88 | 2/17/2026 |