# Contact emailsmk...@chromium.org# Spechttps://w3c.github.io/webappsec-credential-management/I've discussed this spec with the TAG a few times over the last ~year: (
https://github.com/w3ctag/spec-reviews/issues/49). I believe they're happy with the general structure of the API.
# SummaryThis intent covers a programmatic interface to the browser's password manager. In short, an origin can request a user's credentials via `navigator.credentials.get()`, and ask the browser to save credentials via `navigator.credentials.store()`.
The API provides a few properties that I think are interesting:
1. Websites that care can bypass the proprietary hodgepodge of heuristics that each browser has piled together to detect sign-in forms, password changes, and etc. It's significantly better for a website to say "Hey, the user just signed in. Really. Would you mind prompting to save their credentials?" than for the browser to guess at the same. This is especially valuable for the kinds of sign-in operations that we're particularly bad at (XHR/Fetch-based asynchronous authentication, for instance).
2. Today, we have zero heuristics (proprietary hodgepodge or not) for federated sign-in. If you, like me, have created ~4 accounts at Stack Overflow because you couldn't remember whether you used Twitter, Google, or one of the other ~16 options they provide, the support this API provides for federation might be helpful.
3. We can streamline the sign-in process by offering automatic sign-in. You could imagine that if the right settings are toggled, there's no reason a user should ever see a sign-in form for their favorite websites ever again.
4. Some measure of XSS mitigation, as passwords provided for sign-in aren't directly script-accessible.
# Link to “Intent to Implement” blink-dev discussionhttps://groups.google.com/a/chromium.org/d/msg/blink-dev/KrxJvW80yPg/-UC9370USHYJ# Is this feature supported on all six Blink platforms?Everything but WebView. The API is exposed there, but will always return without granting access to credentials (as WebView has no password manager).
We haven't yet implemented the bindings for iOS, but we intend to ship the API there as well.
# Demo linkhttps://w3c.github.io/webappsec/demos/credential-management/# Debuggabilitychrome://settings/passwords shows all the credentials available for an origin, as does the key icon in the address bar. We aren't doing anything beyond that with regard to DevTools.
# Interoperability and Compatibility RiskThis API is strictly additive; it gives developers the ability to imperatively interact with the browser's password manager, but does not provide fundamentally new capabilities. Developers will need to check that the API exists before poking at it, and will certainly need to handle the cases in which a user's browser doesn't support the API, or the user doesn't have credentials for an origin, or doesn't wish to provide them, etc. In each of these cases, we expect developers to continue to display a sign-in form of some sort, and we'll continue autofilling it.
Moreover, last year was punctuated with intense discussion in standards bodies, and the shape of the API we've ended up with is intentionally high-level, generic, and extensible in order to support the various use cases that other folks might want to pursue in this space. In particular, work in the newly-formed
Web Authentication WG explicitly lists this spec as a dependency, and I've confirmed with that group's chair that the expectation is that the proposed APIs will use this framework. I think it's unlikely that we would launch this API and then fundamentally change it in ways that were backwards incompatible.
As for other vendors:
* Mozilla folks have been positive on the feature, but aren't committing resources to it at the moment (for example: "
I absolutely think that we should implement this!", and "
no current plans to do a focused implementation, but broadly a direction we're comfortable with"). Independent folks have started poking at an implementation, however (
https://github.com/AxelNennker/firefox_credentials).
* Opera folks have reviewed several of the feature's Blink-side patches, and they see good value in the API's core functionality, but have concerns about the risks of automatic sign-in. They're happy to see it ship, however, as long as the implementation allows them to make their own UI decisions. I believe it does, as the UI implementation is fairly cleanly separated out into to //chrome with hooks from //content and //components.
* The Microsoft rep to the TAG seems interested, but it's unclear whether that interest extends to potential implementation.
* Apple has remained silent on the feature.
I've CC'd some of the specific folks I've been talking to, as an FYI.
# OWP launch tracking bughttps://crbug.com/576705# Entry on the feature dashboardhttps://www.chromestatus.com/feature/5026422640869376
Thanks!