Soenneker.WorkOs.Auth
4.0.84
Prefix Reserved
dotnet add package Soenneker.WorkOs.Auth --version 4.0.84
NuGet\Install-Package Soenneker.WorkOs.Auth -Version 4.0.84
<PackageReference Include="Soenneker.WorkOs.Auth" Version="4.0.84" />
<PackageVersion Include="Soenneker.WorkOs.Auth" Version="4.0.84" />
<PackageReference Include="Soenneker.WorkOs.Auth" />
paket add Soenneker.WorkOs.Auth --version 4.0.84
#r "nuget: Soenneker.WorkOs.Auth, 4.0.84"
#:package Soenneker.WorkOs.Auth@4.0.84
#addin nuget:?package=Soenneker.WorkOs.Auth&version=4.0.84
#tool nuget:?package=Soenneker.WorkOs.Auth&version=4.0.84
Soenneker.WorkOs.Auth
Builds WorkOS AuthKit sign-in flows with random state, S256 PKCE, authorization-code and refresh-token exchange, session revocation, and browser logout URLs.
Installation
dotnet add package Soenneker.WorkOs.Auth
Registration
using Soenneker.WorkOs.Auth.Registrars;
services.AddWorkOsAuthUtilAsScoped(options =>
{
options.ClientId = configuration["WorkOs:ClientId"]!;
options.ClientSecret = configuration["WorkOs:ClientSecret"];
});
The registrar also registers Soenneker.WorkOs.OpenApiClientUtil. Configure its existing WorkOs:ApiKey and HTTP-client settings normally.
Start an authorization flow
using Soenneker.WorkOs.Auth.Models;
WorkOsAuthorizationRedirect redirect = authUtil.CreateAuthorizationRedirect(new WorkOsAuthorizationRequest
{
RedirectUri = "https://example.com/auth/workos/callback",
LoginHint = "person@example.com"
});
// Persist redirect.State and redirect.CodeVerifier until the callback,
// then redirect the browser to redirect.Url.
Exchange the callback code
UserlandAuthenticateResponse session = await authUtil.AuthenticateAuthorizationCode(
code,
savedCodeVerifier,
new WorkOsRequestContext(remoteIpAddress, userAgent),
cancellationToken);
The utility also supports refresh-token exchanges, session revocation, browser logout URL generation, PKCE verification, and unvalidated access-token reading. Applications remain responsible for state persistence, cookies, redirect allowlists, JWT validation, local user provisioning, and authorization policy.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. 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. |
-
net10.0
- Microsoft.AspNetCore.WebUtilities (>= 10.0.12)
- Microsoft.Extensions.Options (>= 10.0.12)
- Soenneker.Hashing.Sha256 (>= 4.0.5)
- Soenneker.WorkOs.OpenApiClientUtil (>= 4.0.211)
- System.IdentityModel.Tokens.Jwt (>= 8.22.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.84 | 0 | 9/17/2026 |
| 4.0.83 | 33 | 9/17/2026 |
| 4.0.82 | 38 | 9/17/2026 |
| 4.0.81 | 48 | 9/16/2026 |
| 4.0.80 | 42 | 9/16/2026 |
| 4.0.79 | 43 | 9/16/2026 |
| 4.0.78 | 70 | 9/16/2026 |
| 4.0.77 | 72 | 9/15/2026 |
| 4.0.76 | 82 | 9/15/2026 |
| 4.0.75 | 95 | 9/13/2026 |
| 4.0.74 | 80 | 9/13/2026 |
| 4.0.73 | 77 | 9/13/2026 |
| 4.0.72 | 91 | 9/13/2026 |
| 4.0.69 | 103 | 9/11/2026 |
| 4.0.68 | 97 | 9/10/2026 |
| 4.0.67 | 95 | 9/10/2026 |
| 4.0.66 | 99 | 9/9/2026 |
| 4.0.65 | 101 | 9/9/2026 |
| 4.0.64 | 97 | 9/8/2026 |
| 4.0.63 | 95 | 9/8/2026 |