coderef

Credential managementBaseline · Widely available

The navigator.credentials API provides generic storage for authentication credentials. Other credential APIs represent specific kinds of credentials, such as password or public key credentials, that the credential management API stores.

Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Jan 15, 2020. Widely available since Jul 15, 2022.

Browser support

DesktopChrome
1–59Not supported
60+Supportedsince Jul 25, 2017
Current: 155
Edge
12–18Not supported
79+Supportedsince Jan 15, 2020
Current: 154
Firefox
1–59Not supported
60+Supportedsince May 9, 2018
Current: 157
Safari
1–12.1Not supported
13+Supportedsince Sep 19, 2019
Current: 27
MobileChrome Android
18–59Not supported
60+Supportedsince Aug 1, 2017
Current: 155
Firefox Android
4–59Not supported
60+Supportedsince May 9, 2018
Current: 157
Safari iOS
1–12.2Not supported
13+Supportedsince Sep 19, 2019
Current: 27

How to use

This feature is Baseline widely available — use it freely, no fallback needed.

Example

Full syntax and examples are on MDN: Credential.

Feature detection

JS · check before using
if ("Credential" in globalThis) {
  // Credential is available
} else {
  // load a polyfill or use a fallback
}

Sub-features

Support for each part of the feature (10). The overall table above shows when the whole feature works.

Sub-featureChromeEdgeFirefoxSafariChrome AndroidFirefox AndroidSafari iOS
Credential51186013516013
Credential.id51186013516013
Credential.isConditionalMediationAvailable_static148148✕16148✕16
Credential.type51186013516013
CredentialsContainer51186013516013
CredentialsContainer.create60186013606013
CredentialsContainer.get51186013516013
CredentialsContainer.preventSilentAccess60186017606017
CredentialsContainer.store51796013516013
Navigator.credentials51186013516013