navigator.credentials is a read-only property that returns a CredentialsContainer for the current document (MDN) — the entry point to the Credential Management API for requesting and storing sign-in credentials.
Read the notes below before you rely on this property. Prefer feature detection when support is limited.
Syntax
Use navigator.credentials. Start with this line.
JavaScript
navigator.credentials
Call
What it does
navigator.credentials
Primary signature.
Built into the browser. Read navigator.credentials on Navigator — no import required.
Clear your session. Log the user out in your app first.
Call preventSilentAccess. Tells the UA not to auto-login silently next time.
Await the Promise. Resolves when the flag is set.
Optional API. Check the method exists before calling.
Compatibility
Browser Support
navigator.credentials is marked Baseline Widely available on MDN (since September 2019). Secure context is required. Some CredentialsContainer methods/options still vary.
✓ Baseline · Widely available
Navigator.credentials
Returns CredentialsContainer for get/store/create/preventSilentAccess. Feature-detect; keep a classic login fallback.
100%Widely available
Google ChromeAll versions · Desktop & Mobile
Full support
Mozilla FirefoxAll versions · Desktop & Mobile
Full support
Apple SafariAll versions · macOS & iOS
Full support
Microsoft EdgeAll versions · Chromium & Legacy
Full support
Internet ExplorerIE 6+ · Legacy environments
Full support
OperaAll modern versions
Full support
credentialsExcellent
Bottom line: Safe to use on HTTPS as progressive enhancement for password / credential UX. Always provide a classic sign-in path.
Frequently Asked Questions
It is a read-only Navigator property that returns a CredentialsContainer for the current document — the entry point to the Credential Management API for requesting, storing, and managing sign-in credentials.
No. MDN marks it Baseline Widely available (since about September 2019). It is not Deprecated, Experimental, or Non-standard. It does require a secure context (HTTPS / localhost).
MDN's pattern: if ("credentials" in navigator) { /* use CredentialsContainer */ } else { /* classic sign-in */ }.
Common methods include get() to retrieve credentials, store() to save them, create() to build credential objects, and preventSilentAccess() to stop automatic silent sign-in after logout.
Yes. The API is available only in secure contexts in supporting browsers.
No. The property is read-only. You call methods on the returned CredentialsContainer object.