Add well-known passkey endpoints and WebAuthn signals support - #68795
Merged
Conversation
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
Contributor
There was a problem hiding this comment.
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+AddPasskeyEndpointsAPIs and supporting contracts/options to serve the passkey endpoints document. - Add WebAuthn signals support to Identity passkeys via new handler methods/results and
SignInManagerentry 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
force-pushed
the
passkeys/merge-to-main
branch
from
August 26, 2026 12:32
b05ab61 to
8e8a0c9
Compare
rokonec
approved these changes
Aug 26, 2026
Contributor
|
/ba-g Unrelated hanging of the Build analysis |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brings the passkey work merged into rolandVi/passkey-work over to main.
Contains two already-reviewed and merged PRs:
Merge conflicts resolved:
since this branch forked, so the passkey endpoints experimental
diagnostic is renumbered to ASP0039.
the file, kept both.
Fixes #67300
Fixes #67299
Fixes #68617
Fixes #68128