Skip to content

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Oct 13, 2025

Backport of #63981 to release/10.0

/cc @MackinnonBuck

Allow UserStore to update passkey name

Fixes an issue where UserStore cannot apply updates to a passkey's name after its initial creation.

Description

Microsoft.AspNetCore.Identity.EntityFrameworkCore provides UserStore (users + roles), and UserOnlyStore (users only). Both stores enable associating one or more passkeys with a user. Passkeys are a new feature in .NET 10.

The UserPasskeyInfo type contains information about a passkey, including its ID, the public key, and the display name (Name).

Some properties in UserPasskeyInfo are mutable, and others are immutable. Calling UserManager.AddOrUpdatePasskeyAsync(user, passkey) will either add a passkey to the user or update only the mutable properties of an existing passkey. These mutable properties consist solely of:

  • Name
  • SignCount
  • IsUserVerified
  • IsBackedUp

The underlying store implementation controls how these properties get updated. UserOnlyStore correctly handled mutations to each of these properties, but UserStore did not update the Name property.

This PR fixes UserStore so that the Name property gets correctly updated.

Fixes #63923

Customer Impact

Apps that utilize Microsoft.AspNetCore.Identity.EntityFrameworkCore and support roles will not be able to change the name of a passkey after its initial creation. A workaround exists, which is to create a custom store type that extends UserStore and override the AddOrUpdatePasskeyAsync method to exhibit the correct behavior.

Regression?

  • Yes
  • No

Passkeys are a new feature in .NET 10. The feature never previously worked in this code path.

Risk

  • High
  • Medium
  • Low

The fix is simple: copy an additional property that wasn't getting copied. This is not a breaking change and does not require schema changes or database migrations.

Verification

  • Manual (required)
  • Automated

New automated tests have been added to ensure that all store implementations support modifications to all mutable passkey properties.

Packaging changes reviewed?

  • Yes
  • No
  • N/A

@MackinnonBuck MackinnonBuck changed the title [release/10.0] Fix UserStore passkey name update [release/10.0] Allow UserStore to update passkey name Oct 13, 2025
@MackinnonBuck MackinnonBuck added the Servicing-approved Shiproom has approved the issue label Oct 13, 2025
Copy link
Contributor

Hi @@github-actions[bot]. This PR was just approved to be included in the upcoming servicing release. Somebody from the @dotnet/aspnet-build team will get it merged when the branches are open. Until then, please make sure all the CI checks pass and the PR is reviewed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Servicing-approved Shiproom has approved the issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants