Skip to content

Cleanup unused parameter from /PasskeyRequestOptions - #70387

Open
Youssef1313 wants to merge 4 commits into
mainfrom
dev/ygerges/cleanup-unused
Open

Youssef1313 wants to merge 4 commits into
mainfrom
dev/ygerges/cleanup-unused

Conversation

@Youssef1313

Copy link
Copy Markdown
Member

No description provided.

@Youssef1313
Youssef1313 requested a review from a team as a code owner November 7, 2026 22:17
Copilot AI balanced review requested due to automatic review settings November 7, 2026 22:17
@github-actions github-actions Bot added the area-commandlinetools Includes: Command line tools, dotnet-dev-certs, dotnet-user-jwts, and OpenAPI label Nov 7, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The passkey login test still expects a username query parameter, so its request predicate will not match the new query-free URL and the test will time out unless updated.

1 open issue
What changed in this PR

Removes the unused username parameter from the Blazor Web template’s passkey sign-in request, keeping the client and endpoint signatures aligned.

Changes:

  • Stops sending the username query parameter and removes the email argument from requestCredential.
  • Removes the unused query-bound parameter from /PasskeyRequestOptions.
File Description
src/​ProjectTemplates/​Web.ProjectTemplates/​content/​BlazorWeb-CSharp/​BlazorWebCSharp.1/​Components/​Account/​Shared/​PasskeySubmit.razor.js Removes the email argument and username query string from passkey sign-in requests.
src/​ProjectTemplates/​Web.ProjectTemplates/​content/​BlazorWeb-CSharp/​BlazorWebCSharp.1/​Components/​Account/​IdentityComponentsEndpointRouteBuilderExtensions.cs Removes the unused username parameter from the request-options endpoint.

Review effort: Balanced

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The passkey test still expects a username query parameter on a request that now has no query string, causing the assertion to fail even when sign-in succeeds.

No open issues 🎉

1 previously missed issue

In code that hasn't changed since last review

Medium severity Update URL assertion for queryless passkey request

src/​ProjectTemplates/​test/​Templates.Blazor.Tests/​BlazorTemplateTest.cs:609

The updated client sends /Account/PasskeyRequestOptions without a query string, but line 609 still asserts that the captured URL contains username=.... Once this predicate captures the new request, that assertion fails even when passkey sign-in succeeds. Replace it with an assertion that the query string is empty.

1 resolved since last review

Review effort: Balanced

@PureWeen

PureWeen commented Nov 9, 2026

Copy link
Copy Markdown
Member

/review

This branch has not been deployed

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

Labels

area-commandlinetools Includes: Command line tools, dotnet-dev-certs, dotnet-user-jwts, and OpenAPI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants