mdn / browser-compat-data

This repository contains compatibility data for Web technologies as displayed on MDN
https://developer.mozilla.org
Creative Commons Zero v1.0 Universal
5.01k stars 2.01k forks source link

api.CredentialsContainer.create - passwordCredentials Not Supported - Safari 14 #7941

Open redgumnfp opened 3 years ago

redgumnfp commented 3 years ago

What information was incorrect, unhelpful, or incomplete?

Although you can create credentials on Safari 13/14, it doesn't work with passwordCredentials.

This is highlighted on the PasswordCredentials page, but not on this page.

What did you expect to see?

It would have been useful to see a note on Safari.

Did you test this? If so, how?

Error message when used within Safari 14 (MacOs and iOS): Only PublicKeyCredential is supported.

MDN page report details * Query: `api.CredentialsContainer.create` * MDN URL: https://developer.mozilla.org/en-US/docs/Web/API/CredentialsContainer/create * Report started: 2020-12-16T18:06:10.107Z
ddbeck commented 3 years ago

Hi @redgumnfp and thanks for reporting this issue. You wrote:

Although you can create credentials on Safari 13/14, it doesn't work with passwordCredentials.

This is highlighted on the PasswordCredentials page, but not on this page.

Could you link to the specific PasswordCredentials page you're talking about here? I wanted to double check which data needs to be reconciled here. Thank you!

redgumnfp commented 3 years ago

Sure, here you go: https://developer.mozilla.org/en-US/docs/Web/API/PasswordCredential

This correctly reports it as not working on Safari, but the overlap on the credentials page is that credentials API does work, just not for this type of credential.

It's also worth noting the other iOS browsers aren't included in your browser compatibility table, but that's perhaps a larger/separate ticket. Specifically: iOS Chrome iOS Firefox

Both are based off of iOS webkit, which is also what app devs use (I believe) in modal webviews within apps. There are a handful of differences between webkit and safari though (for example; WebRTC doesn't work from memory).

This issue, as you'd expect, exists on iOS Chrome too.

saschanaz commented 3 years ago

I wonder we should make a subitem api.CredentialsContainer.create.password (or CredentialCreationOptions, but there is no consensus for dictionaries...) as an alias of api.PasswordCredential with some linter support, so that the versions will always match.

ddbeck commented 3 years ago

Thanks for your patience while I came back to this, @redgumnfp. After better understanding the specification a bit, I think @saschanaz has the right idea here: a subfeature (I'd probably call it password_option) of api.CredentialsContainer.create is probably the best way to capture this information.

That said, I'm not sure it needs to be linked to api.PasswordCredential directly with the linter, since by my reading, there are other valid objects in addition to PasswordCredential. So that's not a blocker to this.

To really spell this out, I think the right thing to do here would be for you (or another contributor) to open a PR that adds a subfeature of create in CredentialsContainer.json. While it would be nice to have support data for the other browsers, I'd accept a PR with nulls for other browsers and versions for Safari.