Check out v4 of the Fauna CLI
v4 of the Fauna CLI is now in beta. The new version introduces enhancements to the developer experience, including an improved authentication workflow. To get started, check out the CLI v4 quick start. |
Credential.byId()
Learn: Credentials |
---|
Get a credential by its
document id
.
Description
Gets a credential, represented as
an Credential
document, by its
document id
.
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 |
---|---|---|---|
id |
true |
ID of the
|
Return value
Type | Description |
---|---|
Resolved reference to the
|
Examples
Credential.byId("401328088781160521")
{
id: "401328088768577609",
coll: Credential,
ts: Time("2099-06-21T18:39:00.735Z"),
document: Customer("111")
}
Is this article helpful?
Tell Fauna how the article can be improved:
Visit Fauna's forums
or email docs@fauna.com
Thank you for your feedback!