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
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Soenneker.WorkOs.Auth" Version="4.0.78" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.WorkOs.Auth" Version="4.0.78" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.WorkOs.Auth" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Soenneker.WorkOs.Auth --version 4.0.78
                    
#r "nuget: Soenneker.WorkOs.Auth, 4.0.78"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Soenneker.WorkOs.Auth@4.0.78
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Soenneker.WorkOs.Auth&version=4.0.78
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.WorkOs.Auth&version=4.0.78
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

alternate text is missing from this package README image 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
Loading failed