Credential

Learn: Credentials

A credential associates a password with an identity document. You can use the credential and password to create an authentication token for an end user, system, or other identity.

Credential collection

Fauna stores credentials as documents in the Credential system collection. You can also access this collection using the Credentials alias.

Credential documents have the following FQL structure:

{
  id: "401328088768577609",
  coll: Credential,
  ts: Time("2099-06-21T18:39:00.735Z"),
  document: Customer("401328088729780297")
}
Field name Value type Description

id

ID

Immutable identifier for the document. Unique within the collection. For the Credential collection, the ID is auto-generated.

coll

Credential

ts

Last time the document was updated.

document

Ref

Document reference for the credential’s identity document.

Static methods

You can use the following static methods to manage the Credential collection in FQL.

Method Description

Get all the identities.

Get a document credential.

Get a credential by its ID.

Create a credential.

Get the first credential matching a predicate function.

Get the name of the Credential collection as a string.

Get identities matching a predicate function.

Instance methods

You can use the following instance methods to manage specific Credential documents in FQL.

Method Description

Delete a credential.

Test a credential exists.

Log in to Fauna.

Replace a credential.

Update a credential.

Password verification.

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!