Repository navigation
Support the WebAuthn signals API for passkeys - #68129
Merged
rolandVi merged 12 commits intoAug 21, 2026
Merged
Conversation
Contributor
|
Thanks for your PR, @rolandVi. Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
halter73
reviewed
Aug 1, 2026
| @@ -1 +1,2 @@ | |||
| #nullable enable | |||
| virtual Microsoft.AspNetCore.Identity.SignInManager<TUser>.MakePasskeySignalOptionsAsync(TUser! user, Microsoft.AspNetCore.Identity.PasskeyUserEntity! userEntity) -> System.Threading.Tasks.Task<string!>! | |||
Member
There was a problem hiding this comment.
Can you open an API proposal following the API review process? #67299 doesn't have a proposed API in it.
Things I'd want the proposal to settle: whether this belongs on IPasskeyHandler<TUser> rather than SignInManager, whether the returned JSON should be a superset of both signal payloads or something directly passable to each JS call, and whether MakePasskeySignalOptionsAsync is the right name once signalUnknownCredential (#68128) shows up, since that one takes a different payload and gets called before sign-in.
Contributor
Author
Co-authored-by: Stephen Halter <[email protected]>
rolandVi
force-pushed
the
roland/passkey-signals
branch
from
August 4, 2026 11:08
22e92f2 to
0f8b457
Compare
Contributor
Author
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). 4 pipeline(s) were filtered out due to trigger conditions. |
…aspnetcore into roland/passkey-signals # Conflicts: # src/Identity/Core/src/PublicAPI.Unshipped.txt
3 tasks
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
signalAllAcceptedCredentials and signalCurrentUserDetails for passkeys
rokonec
requested changes
Aug 18, 2026
signalAllAcceptedCredentials and signalCurrentUserDetails for passkeys
rokonec
approved these changes
Aug 20, 2026
Co-authored-by: Roman Konecny <[email protected]>
This was referenced Sep 1, 2026
Closed
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.
API proposal in #68165.
WebAuthn has three signal methods that let a site tell the browser's passkey provider what the server currently knows. Without them a deleted passkey keeps being offered at sign-in forever, a renamed user stays stale next to the passkey, and a credential the server has never heard of can never be cleared. This adds one method per signal.
Usage
What changed
Each method returns JSON that is exactly one dictionary from the spec, so the browser passes it straight through. An earlier revision returned a single flat superset of the two signed-in payloads, which meant every app's JavaScript had to know which fields belonged to which call. That is spec knowledge duplicated outside the framework, and it breaks the moment a browser supports one signal and not the other.
Splitting also means each method asks for only what it needs.
MakeAllAcceptedCredentialsSignalOptionsAsynctakes just the user, since the credential list comes from the store.MakeCurrentUserDetailsSignalOptionsAsynctakes thePasskeyUserEntityand never touches the passkey store at all.The payloads are built by
IPasskeyHandler<TUser>, so they resolve the RP ID the same way creation and assertion already do and a custom handler stays consistent with the passkeys it issued.SignInManagerdelegates and supplies theHttpContext, matching the other passkey methods.This has to live in the framework because an app cannot easily assemble the payload: the user handle is not the user ID, it is the UTF-8 bytes base64url encoded through the internal
BufferSource. Get it wrong and the call silently does nothing.signalUnknownCredentialis worse, because it deletes permanently, so the handler only returns options on a clean miss fromFindByPasskeyIdAsyncand returns null whenever it cannot be certain.IPasskeyHandler<TUser>shipped in .NET 10, so all three are default interface methods. The two signed-in ones throw, paired withSupportsPasskeySignalOptions.MakeUnknownCredentialSignalOptionsAsyncreturns null instead, since null already means do not signal and a flag would be a second way to say the same thing.The Blazor template gets two components,
AcceptedCredentialsSignalon the manage passkeys page andCurrentUserDetailsSignalon the profile page, plus the unknown credential signal on the login page. They are custom elements rather than JS interop because those pages are static SSR.CurrentUserDetailsSignalsits onAccount/Manage/Indexand not onConfirmEmailChange, which is where an earlier revision had it. That page is anonymous and finds its user from theUserIdquery string, so it would have rendered one account's passkey details for whoever held the confirmation link. The signal is idempotent, so deferring it to the next authenticated page view loses nothing.Testing
17 handler tests and 7 on
SignInManager, covering each payload's exact field set, the configuredServerDomain, the ID mismatch, and every null path on the unknown credential side.End to end with the CDP virtual authenticator: the signalled credential list has to match what the authenticator actually holds and empty out after a delete, and the unknown credential signal has to complete before conditional autofill starts. That last one holds the signal promise pending, asserts autofill has not begun, then resolves it, so the ordering is pinned as a real dependency rather than a timing coincidence.
Resolves #68617.
Resolves #68128.