Authlink.Identity.Client.Core 2.2.0

dotnet add package Authlink.Identity.Client.Core --version 2.2.0
                    
NuGet\Install-Package Authlink.Identity.Client.Core -Version 2.2.0
                    
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="Authlink.Identity.Client.Core" Version="2.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Authlink.Identity.Client.Core" Version="2.2.0" />
                    
Directory.Packages.props
<PackageReference Include="Authlink.Identity.Client.Core" />
                    
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 Authlink.Identity.Client.Core --version 2.2.0
                    
#r "nuget: Authlink.Identity.Client.Core, 2.2.0"
                    
#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 Authlink.Identity.Client.Core@2.2.0
                    
#: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=Authlink.Identity.Client.Core&version=2.2.0
                    
Install as a Cake Addin
#tool nuget:?package=Authlink.Identity.Client.Core&version=2.2.0
                    
Install as a Cake Tool

📦 Package Overview

Authlink.Identity.Client.Core is a low-level, dependency-free library that defines interfaces, data contracts, and shared models used by client SDKs that integrate with Authlink Identity.

It is intended to be consumed by higher-level packages such as:

  • Authlink.Identity.Client.Http

🚀 Install

dotnet add package Authlink.Identity.Client.Core

Or via Package Manager:

PM> Install-Package Authlink.Identity.Client.Core

🔧 Purpose

This package serves as a foundation layer, enabling:

  • Abstraction of token and authentication flows
  • Decoupled, testable client implementations
  • Plug-and-play support across .NET environments (console, web, serverless)
  • Rich error handling with detailed error information via ErrorOr<T>

🆕 What's New

v2.2.0

New Features - Registration Session Webhook Support:

  • Added Rejected value to RegistrationSessionStep enum (value 7) - Indicates webhook rejected the registration
  • Added PendingApproval value to RegistrationSessionStep enum (value 8) - Indicates registration is pending manual approval
  • Updated Completed enum value from 7 to 9 to accommodate new steps

Migration Guide:

// The enum now has additional values between ProfileInformationSubmitted and Completed
// ProfileInformationSubmitted = 6
// Rejected = 7 (NEW)
// PendingApproval = 8 (NEW)
// Completed = 9 (changed from 7)

v2.1.0

New Features - User Registration Flow:

  • Added ValidateInvitationCodeRequest / ValidateInvitationCodeResponse for validating invitation codes
  • Added GetRegistrationSessionRequest / GetRegistrationSessionResponse for retrieving registration session state
  • Added SubmitGovernmentIdentifierRequest / SubmitGovernmentIdentifierResponse for submitting government IDs
  • Added InitiateEmailVerificationRequest / InitiateEmailVerificationResponse for starting email verification
  • Added CompleteEmailVerificationRequest / CompleteEmailVerificationResponse for completing email verification
  • Added InitiatePhoneNumberVerificationRequest / InitiatePhoneNumberVerificationResponse for starting phone verification
  • Added CompletePhoneNumberVerificationRequest / CompletePhoneNumberVerificationResponse for completing phone verification
  • Added SubmitProfileInformationRequest / SubmitProfileInformationResponse for submitting profile data
  • Added CompleteRegistrationSessionRequest / CompleteRegistrationSessionResponse for completing registration
  • Added RegistrationSessionDto for registration session data
  • Added RegistrationSessionStatus, RegistrationSessionStep, and IdentifierKind enums

Interface Updates:

  • Updated IIdentityClient with 9 new methods for user registration flow

v2.0.0

⚠️ BREAKING CHANGE: All methods now return ErrorOr<T> instead of throwing exceptions. This provides:

  • Explicit error handling - Errors are values, not exceptions
  • Detailed error context - HTTP status codes, OAuth errors, network failures
  • Type-safe error handling - Compile-time guarantee you handle errors
  • Better debugging - Clear error messages with endpoint and operation details

Error Types

The client now returns specific error types for different failure scenarios:

  • HttpRequestFailed - HTTP errors with status codes and reason phrases
  • ProtocolError - OAuth 2.0 / OIDC protocol errors from the server
  • NetworkError - Connection and network-related failures
  • OperationTimeout - Request timeout errors
  • OperationCancelled - Cancelled operations
  • DeserializationFailed - JSON parsing errors
  • EmptyResponse - Null or empty response bodies
  • UnexpectedException - Unexpected errors with exception details

Migration from v1.x

Before (v1.x):

try
{
    var response = await client.TokenAsync(request);
    Console.WriteLine(response.AccessToken);
}
catch (Exception ex)
{
    // Generic exception handling, limited context
    Console.WriteLine($"Error: {ex.Message}");
}

After (v2.0):

var result = await client.TokenAsync(request);

if (result.IsError)
{
    // Rich error information available
    var error = result.FirstError;
    Console.WriteLine($"Error: {error.Code} - {error.Description}");
    return;
}

var response = result.Value;
Console.WriteLine(response.AccessToken);

📚 Documentation

https://docs.authlink.co.za

📄 License

MIT

Product Compatible and additional computed target framework versions.
.NET 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 was computed.  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 (2)

Showing the top 2 NuGet packages that depend on Authlink.Identity.Client.Core:

Package Downloads
Authlink.Auth.ServiceStack

A ServiceStack auth provider that is integrated with the Authlink Identity Provider

Authlink.Identity.Client.Http

System.Net implementation of the Authlink Identity client.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.2.0 30 3/6/2026
2.1.0 128 2/18/2026
2.0.0 389 11/3/2025
1.0.0 208 10/10/2025