-
Notifications
You must be signed in to change notification settings - Fork 22.5k
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
Normalize CredentialsContainer.create() method #33360
Conversation
Preview URLs (7 pages)
External URLs (3)URL:
(comment last updated: 2024-05-15 01:50:06) |
My review list has grown out of control, but if no one else has dealt with this by Monday, I will look at it then. Feel free to ping me a reminder. |
I'm just having a scan now. Plan to look at this Monday/Tues in detail
|
- If the created credential type was a `password` object, the returned instance will be a {{domxref("PasswordCredential")}}. | ||
- A {{domxref("FederatedCredential")}}, if the credential type was `federated`. | ||
- A {{domxref("PasswordCredential")}}, if the credential type was `password`. | ||
- A {{domxref("PublicKeyCredential")}}, if the credential type was `publicKey`. |
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.
PublicKeyCredential
is missing from the sidebar and parent interface doc.
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.
PublicKeyCredential
is defined in the Web Authentication API, not the CM API: https://developer.mozilla.org/en-US/docs/Web/API/Web_Authentication_API.
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.
@wbamberg It fees wrong that it isn't listed on the parent interface but fair enough.
@wbamberg Yes, this structure is vastly better - absolutely in favour of moving forward with this. How do you want to proceed. Merge and continue, or do There are comments inline but here are a few more:
|
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
…level browsing context
For these, I want to say they are not in scope for this PR. This PR is about improving the I think it's more valuable to merge this and then do the same with
-> f0c2d4f |
Thanks for the review! I've made some changes and argued with some others :). |
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 think it's more valuable to merge this and then do the same with get(), and then think about some high-level guide material for the CM API, and maybe then improve the other reference pages.
For sure. Though I'd work on the linked reference pages that are part of this API before the high level guide (just the way I roll :-).
PS, I note you also asked @pepelsbey for a review, but I am confident this is more than acceptable to merge based on the "much better than before" gate. Vadim, if you want to add notes as a post process, I'm sure Will will be happy to take them.
This PR is an attempt to make https://developer.mozilla.org/en-US/docs/Web/API/CredentialsContainer/create more comprehensible, by making standalone pages for the three different dictionary types that are used to create each of the three credential types (password, federated, public key).
It makes https://developer.mozilla.org/en-US/docs/Web/API/CredentialsContainer/create much shorter, simpler, and consistent with the other method pages we have, and I hope exposes its high-level structure much more clearly.
I've also added glossary entries for "credential" and "authentication"- they are pretty short but a reasonable start.
Various things.
create()
page has a note at the start saying "This method is restricted to top-level browsing contexts", which AFAICT is also wrong, I seem to get it working fine in an iframe.PasswordCredential()
constructor along the same lines as https://pr33360.content.dev.mdn.mozit.cloud/en-US/docs/Web/API/PasswordCredentialInit, especially for the bits about initializing from a form.CredentialsContainer/create
I think because of CI: PR review companion doesn't handle redirects well #32501.If you like this we will do the same for https://developer.mozilla.org/en-US/docs/Web/API/CredentialsContainer/get. There's a lot more scope for improving the credential management docs.