Skip to content

Add well-known passkey endpoints and WebAuthn signals support - #68795

Merged
rolandVi merged 27 commits into
dotnet:mainfrom
rolandVi:passkeys/merge-to-main
Aug 27, 2026
Merged

Add well-known passkey endpoints and WebAuthn signals support#68795
rolandVi merged 27 commits into
dotnet:mainfrom
rolandVi:passkeys/merge-to-main

Conversation

@rolandVi

@rolandVi rolandVi commented Aug 26, 2026

Copy link
Copy Markdown
Member

Brings the passkey work merged into rolandVi/passkey-work over to main.

Contains two already-reviewed and merged PRs:

Merge conflicts resolved:

  • docs/list-of-diagnostics.md: main took ASP0033 for [ValidatableType]
    since this branch forked, so the passkey endpoints experimental
    diagnostic is renumbered to ASP0039.
  • SignInManagerTest.cs: both sides added tests at the same point in
    the file, kept both.

Fixes #67300
Fixes #67299
Fixes #68617
Fixes #68128

rolandVi and others added 25 commits July 28, 2026 17:20
Misleading comment

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Stephen Halter <shalter+msft@microsoft.com>
Add serving of .well-known/passkey-endpoints to Identity
…aspnetcore into roland/passkey-signals

# Conflicts:
#	src/Identity/Core/src/PublicAPI.Unshipped.txt
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Roman Konecny <rokonecn@microsoft.com>
Support the WebAuthn signals API for passkeys
@rolandVi
rolandVi requested review from rokonec and a lite review from Copilot August 26, 2026 09:14
@rolandVi
rolandVi requested review from a team and SamMonoRT as code owners August 26, 2026 09:14
@rolandVi rolandVi added the area-identity Includes: Identity and providers label Aug 26, 2026

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.

Pull request overview

This pull request brings passkey-related features into main by adding Identity support for the well-known /.well-known/passkey-endpoints document and adding WebAuthn “signals” support (accepted credentials, current user details, and unknown credential) along with corresponding Blazor template updates and tests.

Changes:

  • Add MapWellKnownPasskeyEndpoints + AddPasskeyEndpoints APIs and supporting contracts/options to serve the passkey endpoints document.
  • Add WebAuthn signals support to Identity passkeys via new handler methods/results and SignInManager entry points.
  • Update the Blazor Web template to emit signal calls (via custom elements) and expand Playwright template tests to validate signaling behavior.

Reviewed changes

Copilot reviewed 34 out of 34 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWebCSharp.1/Components/App.razor Loads new JS modules for passkey signaling custom elements in the template.
src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWebCSharp.1/Components/Account/Shared/PasskeySubmit.razor.js Adds unknown-credential signaling before starting conditional mediation autofill.
src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWebCSharp.1/Components/Account/Shared/PasskeySubmit.razor Plumbs unknown-credential signal options JSON into the custom element attribute.
src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWebCSharp.1/Components/Account/Shared/CurrentUserDetailsSignal.razor.js New custom element that calls signalCurrentUserDetails and retries after failure.
src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWebCSharp.1/Components/Account/Shared/CurrentUserDetailsSignal.razor Generates current-user-details signal payload via SignInManager.
src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWebCSharp.1/Components/Account/Shared/AllAcceptedCredentialsSignal.razor.js New custom element that calls signalAllAcceptedCredentials and retries after failure.
src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWebCSharp.1/Components/Account/Shared/AllAcceptedCredentialsSignal.razor Generates accepted-credentials signal payload via SignInManager.
src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWebCSharp.1/Components/Account/Pages/Manage/Passkeys.razor Emits accepted-credentials signal on the passkeys management page.
src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWebCSharp.1/Components/Account/Pages/Manage/Index.razor Emits current-user-details signal on the account profile page.
src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWebCSharp.1/Components/Account/Pages/Login.razor Captures unknown-credential signal options on failed passkey sign-in and passes to element.
src/ProjectTemplates/test/Templates.Tests/template-baselines.json Adds new template files to baselines.
src/ProjectTemplates/test/Templates.Blazor.Tests/BlazorTemplateTest.cs Extends template E2E to record/validate signal calls (and ordering vs conditional mediation).
src/Identity/test/Identity.Test/SignInManagerTest.cs Adds unit tests for new SignInManager signal option APIs and capability flag behavior.
src/Identity/test/Identity.Test/Passkeys/PasskeyHandlerSignalTest.cs Adds unit tests validating exact JSON payload shapes and safety checks for signals.
src/Identity/test/Identity.FunctionalTests/AddPasskeyEndpointsTests.cs Adds functional tests for mapping and behavior of /.well-known/passkey-endpoints.
src/Identity/samples/IdentitySample.PasskeyUI/Program.cs Demonstrates advertising and mapping the well-known passkey endpoints document in the sample.
src/Identity/Core/src/UnknownCredentialSignalOptionsResult.cs New public result contract for unknown-credential signal JSON.
src/Identity/Core/src/SignInManager.cs Adds signal option generation APIs and capability flag (SupportsPasskeySignalOptions).
src/Identity/Core/src/PublicAPI.Unshipped.txt Tracks newly added public APIs.
src/Identity/Core/src/Passkeys/UnknownCredentialSignalOptions.cs Internal JSON shape for unknown-credential signaling.
src/Identity/Core/src/Passkeys/PublicKeyCredentialId.cs Internal DTO for extracting credential id from a public key credential JSON payload.
src/Identity/Core/src/Passkeys/CurrentUserDetailsSignalOptions.cs Internal JSON shape for current-user-details signaling.
src/Identity/Core/src/Passkeys/AllAcceptedCredentialsSignalOptions.cs Internal JSON shape for accepted-credentials signaling.
src/Identity/Core/src/PasskeyHandler.cs Implements signal option generation, ID consistency checks, and safe unknown-credential lookup behavior.
src/Identity/Core/src/PasskeyEndpointsServiceCollectionExtensions.cs Adds DI configuration API for passkey endpoints options.
src/Identity/Core/src/PasskeyEndpointsOptions.cs New public options type for configuring advertised passkey endpoints.
src/Identity/Core/src/PasskeyEndpointsEndpointRouteBuilderExtensions.cs Adds endpoint mapping implementation for serving the well-known document, including normalization/logging.
src/Identity/Core/src/IPasskeyHandler.cs Adds default-interface-method hooks for signal option generation + capability flag.
src/Identity/Core/src/IdentityJsonSerializerContext.cs Registers new internal signal DTOs for source-generated JSON serialization.
src/Identity/Core/src/Data/PasskeyEndpointsResponse.cs Adds internal response contract for the well-known document body.
src/Identity/Core/src/Data/IdentityEndpointsJsonSerializerContext.cs Registers the passkey endpoints response for source-generated JSON serialization.
src/Identity/Core/src/CurrentUserDetailsSignalOptionsResult.cs New public result contract for current-user-details signal JSON.
src/Identity/Core/src/AllAcceptedCredentialsSignalOptionsResult.cs New public result contract for accepted-credentials signal JSON.
docs/list-of-diagnostics.md Updates analyzer diagnostics list to include ASP0039 for the experimental APIs.
Suppressed comments (2)

src/ProjectTemplates/test/Templates.Blazor.Tests/BlazorTemplateTest.cs:457

  • JsonElement.GetString() returns string? under nullable, so projecting it into a string[] will produce nullability warnings/errors (and could hide malformed payloads). Consider throwing if any credential ID isn't a string (or use ! if you prefer).
    src/ProjectTemplates/test/Templates.Blazor.Tests/BlazorTemplateTest.cs:506
  • This Select() pipeline calls GetString() (nullable) and passes it into Convert.FromBase64String(string). With nullable enabled this will warn/error and can mask an unexpected CDP payload. Add an explicit null guard/throw when credentialId is missing.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

@rolandVi
rolandVi force-pushed the passkeys/merge-to-main branch from b05ab61 to 8e8a0c9 Compare August 26, 2026 12:32
@dariatiurina

Copy link
Copy Markdown
Contributor

/ba-g Unrelated hanging of the Build analysis

@rolandVi
rolandVi merged commit 27b6b07 into dotnet:main Aug 27, 2026
29 checks passed
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 12.0-preview1 milestone Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-identity Includes: Identity and providers

Projects

None yet

4 participants