WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
242002
preventSilentAccess throws NotSupportedError
https://bugs.webkit.org/show_bug.cgi?id=242002
Summary
preventSilentAccess throws NotSupportedError
Luke Warlow
Reported
2022-06-25 08:25:40 PDT
Safari has "implemented" the `preventSilentAccess` function from the Credential Management API (
https://w3c.github.io/webappsec-credential-management/#dom-credentialscontainer-preventsilentaccess
). However, it unconditionally throws a NotSupportedError whenever it's called. This happens on both macOS and iOS from my testing. The specification doesn't mention this as an expected behaviour and I was surprised to see that the function is implemented but also not implemented, meaning my feature detection looking for the existence of the function fails. The below code can be pasted into Web Inspector on a secure domain to demonstrate the issue. Both Chromium and Firefox work correctly but Safari fails. if (navigator.credentials.preventSilentAccess) { console.log('preventSilentAccess is implemented'); navigator.credentials.preventSilentAccess() .then(() => { console.log('preventSilentAccess succeeded'); }) .catch((err) => { console.log('preventSilentAccess failed'); console.error(err); }); } else { console.log('preventSilentAccess is NOT implemented'); }
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2022-06-27 16:32:07 PDT
<
rdar://problem/96020741
>
Alexey Proskuryakov
Comment 2
2022-06-27 16:35:51 PDT
This is definitely how it is implemented indeed. It's been a long time since this code was added, and I couldn't find any explanation of why it was done this way. void CredentialsContainer::preventSilentAccess(DOMPromiseDeferred<void>&& promise) const { promise.reject(Exception { NotSupportedError, "Not implemented."_s }); }
Luke Warlow
Comment 3
2023-03-09 09:02:15 PST
Pull request:
https://github.com/WebKit/WebKit/pull/11303
EWS
Comment 4
2023-05-22 12:37:22 PDT
Committed
264345@main
(40294715d0c0): <
https://commits.webkit.org/264345@main
> Reviewed commits have been landed. Closing PR #11303 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug