Support passwordless account creation - #68648
Merged
Merged
Conversation
Member
Author
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). 4 pipeline(s) were filtered out due to trigger conditions. |
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Enables passwordless (passkey-first) registration in the Blazor “Individual Accounts” template by adding a dedicated anonymous passkey registration-options endpoint and wiring the Register page to initiate a WebAuthn attestation flow without requiring a password. It also hardens the Login flow against passkey ceremony-state collisions (multi-tab) that can otherwise surface as 500s.
Changes:
- Add passkey-based registration flow (client + server) and UI entry point on
/Account/Register. - Add an anonymous
/Account/PasskeyRegistrationOptionsendpoint that validates the email before starting the ceremony. - Fix passkey login to handle ceremony cookie collisions gracefully; expand template test coverage for passkey-only accounts.
File summaries
| File | Description |
|---|---|
| src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWebCSharp.1/Components/Account/Shared/PasskeySubmit.razor.js | Adds “Register” ceremony support and improves server error surfacing for fetch calls. |
| src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWebCSharp.1/Components/Account/PasskeyOperation.cs | Adds Register enum value for passkey-submit operation selection. |
| src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWebCSharp.1/Components/Account/Pages/Register.razor | Adds “Sign up with a passkey” path and server-side handler for creating the account around the attested user handle. |
| src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWebCSharp.1/Components/Account/Pages/Login.razor | Prevents 500s by handling passkey ceremony-state collisions as a user-facing “session expired” error. |
| src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWebCSharp.1/Components/Account/IdentityComponentsEndpointRouteBuilderExtensions.cs | Adds /PasskeyRegistrationOptions endpoint that validates email and runs UserValidators before returning creation options. |
| src/ProjectTemplates/test/Templates.Blazor.Tests/BlazorTemplateTest.cs | Adds an E2E scenario covering passkey-only registration and subsequent sign-in behavior. |
| src/Identity/Core/src/SignInManager.cs | Clarifies guidance in XML docs around “initial credential” vs adding passkeys to existing accounts. |
Review details
- Files reviewed: 7/7 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
rolandVi
requested review from
Youssef1313,
cincuranet and
davpetr
as code owners
September 14, 2026 09:28
rokonec
approved these changes
Sep 14, 2026
Member
Author
|
/azp run aspnetcore-ci |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
rokonec
approved these changes
Sep 15, 2026
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.
Builds on #68522.
You can now sign up on the Blazor template with a passkey and no password. Today the register page insists on a password, so the only route to a passkey is to invent one first, sign in, and go find the manage page.
Design notes
Registration gets its own anonymous endpoint rather than relaxing
/Account/Manage/PasskeyCreationOptions, which stays behindRequireAuthorization()and the reauthentication check. It never looks up an existing account: reusing one's ID would let anyone type your address, make a passkey, and have it attached to your account.The address runs through the same validators
CreateAsyncuses before any options go out, so a taken one is refused before you are asked for a fingerprint and left holding a passkey the server never stored.Login page fix
Login.razoris in here too. Both ceremonies keep their state in one shared cookie, and the login page starts one by itself for autofill, so two tabs can collide, which throws instead of failing and gives a 500. That was hard to hit before. With Register one click from Login, it is not.Resolves #67297.