Skip to content
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

Fix return type of CredentialsContainer.store #215

Merged
merged 1 commit into from
Jul 5, 2023

Conversation

lukewarlow
Copy link
Member

@lukewarlow lukewarlow commented Mar 18, 2023

Fixes #214 #98


Preview | Diff

@rschristian
Copy link

Would be really nice to get this merged! I was a bit miffed with my tests until I thought to come here and see if anyone had the same issue.

@lukewarlow
Copy link
Member Author

@npm1 are you able to take a look at this? Or direct the correct person to review it?

@johannhof
Copy link
Member

@nsatragno ^

@npm1
Copy link
Contributor

npm1 commented Jul 4, 2023

FWIW the IDL in Chromium says Promise<Credential> but the promise is being resolved with nothing.

@lukewarlow
Copy link
Member Author

FWIW the IDL in Chromium says Promise<Credential> but the promise is being resolved with nothing.

Yeah that along with the typescript types being wrong is what led me here.

@nsatragno
Copy link
Member

Oh I am so sorry I did not take a look earlier, for some reason this PR never sent me a notification. This issue is related to #98 and we might be able to close both with the same PR.

I agree we should update the spec to match implementation and have the promise return undefined. Could you also update the references to the return value?

Step 7.1 of Store a Credential should say "Resolve p with undefined" instead. There is no point resolving with r if we'll always return undefined.

I think we can also do away with Return undefined on PasswordCredential's [[store]] and FederatedCredential's [[store]].

Another interesting bit is that the default implementation for [[store]] says to return undefined, but in practice we throw instead. Throwing IMO is better as a signal that the developer is doing something that is not supported, I filed #218 to track this.

(It looks like the build is broken again too -- don't worry about spurious errors, for now we can force-push the PR and fix them later)

@lukewarlow
Copy link
Member Author

lukewarlow commented Jul 4, 2023

No worries! I'll make those changes tomorrow.

@lukewarlow lukewarlow force-pushed the credentials-container-store branch from 47dfdd8 to 95b7e79 Compare July 5, 2023 00:26
@lukewarlow
Copy link
Member Author

@nsatragno Those changes should be done now

@w3cbot
Copy link

w3cbot commented Jul 5, 2023

nsatragno marked as non substantive for IPR from ash-nazg.

Copy link
Member

@nsatragno nsatragno left a comment

Choose a reason for hiding this comment

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

Approved, thanks!

@nsatragno nsatragno merged commit c009d69 into w3c:main Jul 5, 2023
1 check failed
ASISBusiness

This comment was marked as abuse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Return type of CredentialsContainer.store is wrong
7 participants