Home

navigatorcredentialsget

Navigator.credentials.get is a method in the Credentials Management API used to retrieve credentials stored on the user's device. It is a key part of Web Authentication (WebAuthn) workflows, enabling a site to request an assertion from the user without relying solely on passwords. The call is made via the JavaScript API as navigator.credentials.get and is designed to work in secure contexts with user consent.

Invocation of navigator.credentials.get returns a promise that resolves to a Credential object or null. The concrete

When used for WebAuthn, the browser may prompt the user to interact with a platform authenticator (such

Security and privacy considerations include requiring a secure context (HTTPS), a user gesture to initiate the

Browser support for navigator.credentials.get is widespread in modern browsers with WebAuthn support, though implementation details can

type
of
the
returned
credential
depends
on
the
credentials
stored
for
the
origin;
it
can
be
a
PasswordCredential
for
password-based
flows
or
a
PublicKeyCredential
for
WebAuthn-based
authentication.
In
a
WebAuthn
flow,
the
method
is
typically
called
with
an
options
object
containing
a
publicKey
property
that
carries
the
challenge,
allowed
credentials,
timeout,
and
user
verification
preferences.
as
a
built-in
biometric
or
PIN)
or
an
external
security
key.
If
the
user
completes
the
prompt
successfully,
the
resulting
PublicKeyCredential
contains
authenticator
data,
the
client
data
JSON,
and
a
signature
that
the
server
can
verify
using
the
stored
public
key
during
authentication.
request,
and
origin-bound
access
to
credentials.
The
retrieved
data
is
exposed
only
to
the
requesting
origin,
and
servers
must
verify
assertions
as
part
of
the
authentication
flow.
If
no
credential
matches
the
request,
the
promise
resolves
to
null.
vary.
It
is
a
foundational
API
for
passwordless
and
multi-factor
authentication
workflows.
See
WebAuthn,
the
Credentials
Management
API,
and
passwordless
authentication
for
related
concepts.