Skip to content

Add passkey transport hints and challenge size samples - #388

Draft
StuFrankish wants to merge 2 commits into
mainfrom
sf/passkey-improvement-samples
Draft

StuFrankish wants to merge 2 commits into
mainfrom
sf/passkey-improvement-samples

Conversation

@StuFrankish

Copy link
Copy Markdown
Member

Adds focused samples for User Management's automatic passkey transport hints and configurable challenge length, so users can observe these features without adapting the full application sample.

Approach

  • TransportHints reuses GettingStarted's console OTP login, then demonstrates registration hint capture, persistence across page reloads, and forwarding to native WebAuthn through the stock JavaScript. Application-owned verification checks the signed-in subject without issuing or elevating a session.
  • ChallengeSize defaults to an explicit 64-byte configuration, displays decoded challenge lengths for registration and discoverable authentication, and documents the 32-byte library default and startup rejection below 16 bytes. It is a begin-only demonstration, not an account-registration workflow.
  • Both projects use public User Management 2.0.0-preview.6, IdentityServer 8.1.0-preview.6, and SQLite Storage 2.0.0-preview.6, with project-local overrides. Shared versions and NuGet configuration are unchanged.

Both stores are in-memory and discard data on restart. TransportHints has documented build-time dependencies on sibling GettingStarted sources. Transport hints are optional browser UX metadata, not a security policy or configurable allow-list.

Validation

  • Both projects restored using nuget.org and built with zero warnings or errors.
  • A session-local Playwright probe using headless Edge and a CTAP2 virtual authenticator completed OTP login, registration, hint persistence across reload, native hint forwarding, and known-user verification. Verification returned no session cookie; a completion POST without an antiforgery token returned 400. Physical authenticators and browser prompt differences were not tested.
  • Registration and discoverable authentication generated 64-, 32-, and 16-byte challenges. A 15-byte configuration failed before the host began listening with OptionsValidationException: Passkeys.ChallengeSize must be >= 16, but was 15.

No test projects or validation scripts are added to the repository. Cookie challenge stores and cryptographic extension implementations are outside this change.

- Demonstrate automatic transport hint capture, storage, and known-user forwarding with application-owned verification\n- Show configurable challenge lengths and startup validation of the 16-byte minimum\n- Use public User Management preview 6 packages with in-memory SQLite and focused walkthroughs\n- Register both sample projects in the solution
@StuFrankish StuFrankish self-assigned this Oct 19, 2026
@StuFrankish
StuFrankish requested review from a team and a balanced review from Copilot October 19, 2026 08:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The focused samples match their documented scope, with no unresolved correctness or security issues identified.

No open issues 🎉

What changed in this PR

Adds two focused User Management samples for observing automatic passkey transport hints and configurable challenge lengths without adapting the full application sample.

Changes:

  • Demonstrates transport-hint capture, persistence, and forwarding during signed-in verification.
  • Displays decoded challenge lengths and documents defaults and minimum-size validation.
  • Adds solution entries, local package overrides, and run instructions.
File Description
samples.slnx Adds both sample projects.
IdentityServer/​v8/​UserManagement/​TransportHints/​wwwroot/​sample.css Styles the transport demonstration.
IdentityServer/​v8/​UserManagement/​TransportHints/​TransportHints.csproj Pins previews and links GettingStarted sources.
IdentityServer/​v8/​UserManagement/​TransportHints/​SignedInUserResolver.cs Resolves the authenticated subject.
IdentityServer/​v8/​UserManagement/​TransportHints/​README.md Documents transport observations and limitations.
IdentityServer/​v8/​UserManagement/​TransportHints/​Properties/​launchSettings.json Sets the local HTTPS endpoint.
IdentityServer/​v8/​UserManagement/​TransportHints/​Program.cs Configures authentication and in-memory storage.
IdentityServer/​v8/​UserManagement/​TransportHints/​Pages/​Shared/​_Layout.cshtml Provides the sign-in layout.
IdentityServer/​v8/​UserManagement/​TransportHints/​Pages/​Index.cshtml.cs Verifies passkeys without changing sessions.
IdentityServer/​v8/​UserManagement/​TransportHints/​Pages/​Index.cshtml Displays transport metadata across ceremonies.
IdentityServer/​v8/​UserManagement/​TransportHints/​Pages/​Account/​_ViewStart.cshtml Applies the account-page layout.
IdentityServer/​v8/​UserManagement/​TransportHints/​Pages/​_ViewImports.cshtml Enables Razor tag helpers.
IdentityServer/​v8/​UserManagement/​ChallengeSize/​wwwroot/​sample.css Styles challenge inspection.
IdentityServer/​v8/​UserManagement/​ChallengeSize/​README.md Documents challenge sizes and validation.
IdentityServer/​v8/​UserManagement/​ChallengeSize/​Properties/​launchSettings.json Sets the local HTTPS endpoint.
IdentityServer/​v8/​UserManagement/​ChallengeSize/​Program.cs Configures challenge size and in-memory storage.
IdentityServer/​v8/​UserManagement/​ChallengeSize/​Pages/​Shared/​_Layout.cshtml Provides the inspection-page layout.
IdentityServer/​v8/​UserManagement/​ChallengeSize/​Pages/​Index.cshtml.cs Begins ceremonies and measures challenges.
IdentityServer/​v8/​UserManagement/​ChallengeSize/​Pages/​Index.cshtml Displays configured and decoded lengths.
IdentityServer/​v8/​UserManagement/​ChallengeSize/​Pages/​_ViewStart.cshtml Applies the shared layout.
IdentityServer/​v8/​UserManagement/​ChallengeSize/​Pages/​_ViewImports.cshtml Enables Razor tag helpers.
IdentityServer/​v8/​UserManagement/​ChallengeSize/​ChallengeSize.csproj Defines the project and preview overrides.
IdentityServer/​v8/​UserManagement/​ChallengeSize/​appsettings.json Sets explicit 64-byte challenges.

Review effort: Balanced

@maartenba maartenba added this to the 2026-Q4 milestone Oct 19, 2026
Comment thread IdentityServer/v8/UserManagement/ChallengeSize/README.md
Comment thread IdentityServer/v8/UserManagement/TransportHints/README.md
- Cite the WebAuthn entropy guidance and explain Duende's minimum and default challenge sizes
- Define transport hints and describe their role in authenticator discovery
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants