LoginLink.Connectors.TrustedDevice.CookieBound 1.0.0

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

LoginLink.Connectors.TrustedDevice.CookieBound

Reference trusted-device connector for LoginLink.

Lets a user mark a device as trusted after completing an MFA challenge, so future sign-ins from that same device can skip the MFA prompt until the trust expires or is revoked.

Status: connector logic implemented (Wave I-5b Phase 5b.5b); not yet wired into any login flow. ITrustedDeviceConnector is fully implemented and registered, but nothing in the host calls it yet — that starts in Phase 5b.5c (TrustedDeviceService + resolver) and becomes visible to users in 5b.5g/5b.5h (the "trust this device" checkbox and the /login skip-MFA logic). Until then this connector is inert.

How it works

  • ComputeFingerprintAsync hashes User-Agent + Accept-Language (SHA-256, Base64) into a stable per-device fingerprint. Deliberately not IP-based (IPs change too often) and not client-side JS fingerprinting.
  • ShouldTrustAsync always returns true — this connector has no eligibility gate beyond what the host already requires (a completed MFA challenge).
  • GrantTrustAsync generates a random 32-byte token (same generation pattern as EmailVerificationService) and returns it as both the value to persist and the cookie value — LoginLink.TrustedDevice cookie name.
  • ValidateTrustAsync reads that cookie back, hashes it the same way, and compares against the host-supplied stored hash. The host persists only the hash (sessions.trust_token_hash) — the raw token is never stored server-side.
  • Hashing is SHA-256 of the UTF-8 token bytes, Base64-encoded — a fixed, secretless convention any trust connector must follow so the host (hashing at grant time) and the connector (hashing independently at validate time) always agree. See ITrustedDeviceConnector's doc comments for the full contract.
  • Trust duration defaults to 30 days (tenant range 1–90, platform floor caps at 90) and auto-revokes on session revoke, password change, or MFA method change — this policy logic lives in the host (TrustedDeviceService, Phase 5b.5c), not in this connector.

Install

dotnet add package LoginLink.Connectors.TrustedDevice.CookieBound

License

MIT

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  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

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
1.0.0 155 7/31/2026