Core.Authentication 0.3.80

Core.Authentication — How to Use

Read the authentication and authorization capability guide before selecting packages or making product, marketing, or operational claims. The cross-surface parity plan records what is reusable today and what remains to converge across browser, MAUI, and Avalonia surfaces.

Password hashing

// Inject IPasswordHasher
public class MyService(IPasswordHasher hasher)
{
    public string CreateUser(string plainPassword)
    {
        return hasher.HashPassword(plainPassword); // Store this
    }

    public bool Login(string plainPassword, string storedHash)
    {
        return hasher.VerifyPassword(plainPassword, storedHash);
    }

    public bool ShouldRehash(string storedHash)
    {
        return hasher.NeedsRehash(storedHash); // Rehash on next login if true
    }
}

Password validation

public class RegistrationHandler(IPasswordValidationService validator)
{
    public IResult Register(string password)
    {
        var result = validator.ValidatePassword(password);
        if (!result.IsValid)
            return Results.BadRequest(result.Errors);
        // ...
    }
}

SSO — checking if SSO is enabled

// ISsoService.IsSsoEnabledForUserTypeAsync accepts Uuid7 tenantId
var tenantId = Uuid7.From(tenantGuid); // Convert from Guid at boundary
bool enabled = await ssoService.IsSsoEnabledForUserTypeAsync(tenantId, "internal");

SSO — starting an SSO flow

// tenantId comes from the current session context as Uuid7
var authUrl = await ssoService.GetAuthorizationUrlAsync(tenantId, "AzureAD", "internal", redirectUri);
// Redirect user to authUrl

SSO — completing an SSO callback

var result = await ssoService.AuthenticateAsync(tenantId, "AzureAD", code, redirectUri, state);
if (!result.Success)
    return Results.Unauthorized();

// result.UserUid is the string UID of the authenticated user
// result.TenantUid is the string UID of the tenant

DI registration

services.AddCentralizedAuthentication();

// Auth broker hosts opt in separately and must configure an RP ID plus exact origins.
services.AddCorePasskeys(configuration);

See Passkeys and durable portal sessions before enabling passkeys or persistent broker sessions in a public host.

See Multi-factor authentication before requiring another factor for password sign-in. Email code is a transitional control and is not represented as AAL2; TOTP and passkeys are the supported stronger methods.

Uuid7 at the API boundary

All ISsoService methods take Uuid7 tenantId. When receiving a tenant UID from an HTTP request (string), convert it once at the handler level:

// In a Minimal API or controller handler
var tenantId = Uuid7.From(tenantUidString); // Throws if invalid — validate input first

Showing the top 20 packages that depend on Core.Authentication.

Packages Downloads
Core.Api.Shared
Shared Core API components: controllers, format/content helpers, auth policies, and API extension points.
99
Core.Api.Shared
Shared Core API components: controllers, format/content helpers, auth policies, and API extension points.
64
Core.Api.Shared
Shared Core API components: controllers, format/content helpers, auth policies, and API extension points.
22
Core.Api.Shared
Shared Core API components: controllers, format/content helpers, auth policies, and API extension points.
20
Core.Api.Shared
Shared Core API components: controllers, format/content helpers, auth policies, and API extension points.
18
Core.Api.Shared
Shared Core API components: controllers, format/content helpers, auth policies, and API extension points.
17
Core.Api.Shared
Shared Core API components: controllers, format/content helpers, auth policies, and API extension points.
16
Core.Api.Shared
Shared Core API components: controllers, format/content helpers, auth policies, and API extension points.
9
Core.Api.Shared
Shared Core API components: controllers, format/content helpers, auth policies, and API extension points.
8
Core.Api.Shared
Shared Core API components: controllers, format/content helpers, auth policies, and API extension points.
7
Core.Api.Shared
Shared Core API components: controllers, format/content helpers, auth policies, and API extension points.
6

Version Downloads Last updated
0.3.80 18 08/12/2026
0.3.79 18 07/24/2026
0.3.78 16 07/24/2026
0.3.77 62 07/20/2026
0.3.76 4 07/19/2026
0.3.75 8 07/19/2026
0.3.74 3 07/19/2026
0.3.73 4 07/18/2026
0.3.72 3 07/17/2026
0.3.71 3 07/17/2026
0.3.70 3 07/17/2026
0.3.69 5 07/17/2026
0.3.68 4 07/17/2026
0.3.67 3 07/17/2026
0.3.66 3 07/16/2026
0.3.65 3 07/16/2026
0.3.64 3 07/15/2026
0.3.63 3 07/15/2026
0.3.62 3 07/15/2026
0.3.61 5 07/15/2026
0.3.60 3 07/14/2026
0.3.59 3 07/14/2026
0.3.58 3 07/14/2026
0.3.57 3 07/14/2026
0.3.56 3 07/14/2026
0.3.55 3 07/14/2026
0.3.50 5 07/13/2026
0.3.49 3 07/13/2026
0.3.48 3 07/13/2026
0.3.27 7 07/05/2026
0.3.26 6 07/05/2026
0.3.24 5 07/03/2026
0.3.23 17 06/23/2026
0.3.22 5 06/22/2026
0.3.21 6 06/21/2026
0.3.20 5 06/19/2026
0.3.19 5 06/19/2026
0.3.18 5 06/19/2026
0.3.17 6 06/19/2026
0.3.16 4 06/19/2026
0.3.15 4 06/19/2026
0.3.14 5 06/19/2026
0.3.13 5 06/19/2026
0.3.12 4 06/19/2026
0.3.11 5 06/19/2026
0.3.10 5 06/19/2026
0.3.9 4 06/19/2026
0.3.8 5 06/19/2026
0.3.7 5 06/19/2026
0.3.6 5 06/18/2026
0.3.5 6 06/18/2026
0.3.4 7 06/10/2026
0.3.0 8 06/02/2026
0.2.0 8 06/02/2026
0.1.3-local.1 6 06/10/2026
0.1.2 8 05/31/2026
0.1.2-local.1 4 06/10/2026
0.1.1 20 05/28/2026
0.1.0 99 05/23/2026
0.1.0-alpha.7 6 05/21/2026
0.1.0-alpha.6 4 05/21/2026
0.1.0-alpha.5 6 05/21/2026
0.1.0-alpha.4 7 05/21/2026
0.1.0-alpha.3 6 05/21/2026
0.1.0-alpha.2 5 05/20/2026