-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Allow UserStore
to update passkey name
#63981
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes a bug in the ASP.NET Core Identity UserStore
where passkey name updates were not being persisted after initial creation. The fix ensures that both UserStore
and UserOnlyStore
implementations have consistent behavior when updating passkey properties.
- Adds missing
userPasskey.Data.Name = passkey.Name
assignment inUserStore.AddOrUpdatePasskeyAsync
- Updates test configurations to use Identity schema version 3 to enable passkey functionality
- Adds comprehensive test coverage for passkey operations including name updates
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
src/Identity/EntityFrameworkCore/src/UserStore.cs | Fixes the missing passkey name update and adds null check for credentialId parameter |
src/Identity/EntityFrameworkCore/src/UserOnlyStore.cs | Adds null check for credentialId parameter for consistency |
src/Identity/Specification.Tests/src/IdentitySpecificationTestBase.cs | Enables schema version 3 and adds comprehensive passkey test coverage |
src/Identity/Specification.Tests/src/UserManagerSpecificationTests.cs | Enables schema version 3 for passkey support |
src/Identity/EntityFrameworkCore/test/EF.Test/UserStoreTest.cs | Updates test configuration and removes unnecessary blank line |
src/Identity/EntityFrameworkCore/test/EF.Test/UserStoreWithGenericsTest.cs | Configures schema version 3 for testing |
src/Identity/EntityFrameworkCore/test/EF.Test/UserStoreEncryptPersonalDataTest.cs | Enables schema version 3 |
src/Identity/EntityFrameworkCore/test/EF.Test/SqlStoreTestBase.cs | Configures schema version 3 for tests |
/backport to release/10.0 |
Started backporting to release/10.0: https://github.com/dotnet/aspnetcore/actions/runs/18471119374 |
UserStore
passkey name updateUserStore
to update passkey name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change looks good to me. I think it's good to unify how both stores behave. Great to see all of these tests getting added too.
Summary
Fixes an issue where
UserStore
doesn't apply updates to a passkey's name after its initial creation.Details
The issue was only present in
UserStore
, asUserOnlyStore
was already implemented correctly. I've added extra tests to protected against similar implementation inconsistencies.Fixes #63923