-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[dotnet] Fix webauth credential to allow nullable rpID
#15201
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
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.
I could be misremembering, but I think a credential doesn't work if the rpId
is null.
I'm a little concerned about misleading users if we mark the field as nullable. In order to get rid of the null argument warning, maybe we can change FromDictionary
from TryGetValue
to a direct indexer.
Found this one: https://chromedevtools.github.io/devtools-protocol/tot/WebAuthn/#type-Credential Seems |
What if the |
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.
Per comments about rpId being optional, this change makes sense to me
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.
Nice! These changes offers nullability guidance to users without throwing any exceptions on the C# side
User description
Motivation and Context
Fixes issue, introduced in recent versions.
https://github.com/SeleniumHQ/seleniumhq.github.io/actions/runs/13062596341/job/36448769281
Types of changes
Checklist
PR Type
Bug fix
Description
Made
rpId
parameter nullable inCredential
class.Updated constructors and methods to handle nullable
rpId
.Adjusted exception documentation to reflect nullable
rpId
.Changes walkthrough 📝
Credential.cs
Allow nullable `rpId` in `Credential` class
dotnet/src/webdriver/VirtualAuth/Credential.cs
rpId
parameter to nullable in constructor.CreateNonResidentCredential
andCreateResidentCredential
methods to accept nullable
rpId
.rpId
parameter.