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
<PackageReference Include="Authlink.Identity.Client.Core" Version="2.2.0" />
<PackageVersion Include="Authlink.Identity.Client.Core" Version="2.2.0" />
<PackageReference Include="Authlink.Identity.Client.Core" />
paket add Authlink.Identity.Client.Core --version 2.2.0
#r "nuget: Authlink.Identity.Client.Core, 2.2.0"
#:package Authlink.Identity.Client.Core@2.2.0
#addin nuget:?package=Authlink.Identity.Client.Core&version=2.2.0
#tool nuget:?package=Authlink.Identity.Client.Core&version=2.2.0
📦 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
Rejectedvalue toRegistrationSessionStepenum (value 7) - Indicates webhook rejected the registration - Added
PendingApprovalvalue toRegistrationSessionStepenum (value 8) - Indicates registration is pending manual approval - Updated
Completedenum 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/ValidateInvitationCodeResponsefor validating invitation codes - Added
GetRegistrationSessionRequest/GetRegistrationSessionResponsefor retrieving registration session state - Added
SubmitGovernmentIdentifierRequest/SubmitGovernmentIdentifierResponsefor submitting government IDs - Added
InitiateEmailVerificationRequest/InitiateEmailVerificationResponsefor starting email verification - Added
CompleteEmailVerificationRequest/CompleteEmailVerificationResponsefor completing email verification - Added
InitiatePhoneNumberVerificationRequest/InitiatePhoneNumberVerificationResponsefor starting phone verification - Added
CompletePhoneNumberVerificationRequest/CompletePhoneNumberVerificationResponsefor completing phone verification - Added
SubmitProfileInformationRequest/SubmitProfileInformationResponsefor submitting profile data - Added
CompleteRegistrationSessionRequest/CompleteRegistrationSessionResponsefor completing registration - Added
RegistrationSessionDtofor registration session data - Added
RegistrationSessionStatus,RegistrationSessionStep, andIdentifierKindenums
Interface Updates:
- Updated
IIdentityClientwith 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 phrasesProtocolError- OAuth 2.0 / OIDC protocol errors from the serverNetworkError- Connection and network-related failuresOperationTimeout- Request timeout errorsOperationCancelled- Cancelled operationsDeserializationFailed- JSON parsing errorsEmptyResponse- Null or empty response bodiesUnexpectedException- 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
📄 License
MIT
| Product | Versions 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. |
-
net9.0
- ErrorOr (>= 2.0.1)
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.