credential.replace()
| Learn: Credentials |
|---|
Replace a credential.
Description
Replaces all fields in a
credential, represented as a
Credential document, with fields
from a provided data object. Fields not present in the data object, excluding
the id, coll, and ts metadata fields, are removed.
A credential associates a password with an
identity document. You can
use credentials and the credential.login() method to
create tokens as part of an
end-user authentication system.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
data |
true |
Fields for the For supported document fields, see
The object can’t include the following metadata fields: * |