Soenneker.WorkOs.Auth
4.0.78
Prefix Reserved
dotnet add package Soenneker.WorkOs.Auth --version 4.0.78
NuGet\Install-Package Soenneker.WorkOs.Auth -Version 4.0.78
<PackageReference Include="Soenneker.WorkOs.Auth" Version="4.0.78" />
<PackageVersion Include="Soenneker.WorkOs.Auth" Version="4.0.78" />
<PackageReference Include="Soenneker.WorkOs.Auth" />
paket add Soenneker.WorkOs.Auth --version 4.0.78
#r "nuget: Soenneker.WorkOs.Auth, 4.0.78"
#:package Soenneker.WorkOs.Auth@4.0.78
#addin nuget:?package=Soenneker.WorkOs.Auth&version=4.0.78
#tool nuget:?package=Soenneker.WorkOs.Auth&version=4.0.78
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.204)
- 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.78 | 0 | 9/16/2026 |
| 4.0.77 | 6 | 9/15/2026 |
| 4.0.76 | 51 | 9/15/2026 |
| 4.0.75 | 62 | 9/13/2026 |
| 4.0.74 | 48 | 9/13/2026 |
| 4.0.73 | 46 | 9/13/2026 |
| 4.0.72 | 58 | 9/13/2026 |
| 4.0.69 | 73 | 9/11/2026 |
| 4.0.68 | 65 | 9/10/2026 |
| 4.0.67 | 66 | 9/10/2026 |
| 4.0.66 | 84 | 9/9/2026 |
| 4.0.65 | 97 | 9/9/2026 |
| 4.0.64 | 93 | 9/8/2026 |
| 4.0.63 | 94 | 9/8/2026 |
| 4.0.62 | 94 | 9/8/2026 |
| 4.0.61 | 99 | 9/8/2026 |
| 4.0.60 | 112 | 9/8/2026 |
| 4.0.59 | 95 | 9/8/2026 |
| 4.0.58 | 98 | 9/7/2026 |
| 4.0.57 | 89 | 9/7/2026 |