with the credential management API
James Allardice
You can sync passwords across devices.
Federated identity providers
The Credential
Management API
WD
CR
PR
REC
Working
draft
Candidate
recommendation
Proposed
recommendation
Recommendation
WD
CR
PR
REC
Working
draft
Candidate
recommendation
Proposed
recommendation
Recommendation
Credential Management API
(as of November 2017)
Assertion about an entity which enables a trust decision
autocomplete="username"
autocomplete="current-password"
autocomplete="new-password"
const formData = new FormData(loginForm);
fetch('/', {
method: 'POST',
headers: {
Accept: 'application/json',
},
credentials: 'include',
body: formData,
})
.then((response) => response.json())
.then((json) => { /* ... */ });
const credential = new PasswordCredential(form);
navigator.credentials
navigator.credentials.store(credentials)
.then(() => { /* ... */ });
// Ask the browser for the stored password credential.
navigator.credentials.get({
password: true,
})
.then((credentials) => {
const formData = new FormData();
formData.append(credential.idName, credential.id);
formData.append(credential.passwordName, credential.password);
// Make request with `formData`
});
// Prevent automatic logins for the rest of the session.
navigator.credentials.preventSilentAccess();
James Allardice