The Fauna service will be ending on May 30, 2025.

For more information on the service wind down, see our announcement and the Fauna Service End-of-Life FAQ.

credential.verify()

Learn: Credentials

Test whether a provided password is valid for a credential.

Signature

verify(secret: String) => Boolean

Description

Verify a password against a Credential document.

Parameters

Parameter Type Required Description

secret

String

true

Password to compare against the credential document.

Return value

Type Description

Boolean

The secret status. A status of true means the password is valid, while false means it is invalid.

Examples

Credential.byId("412654807560487424")!.verify("fauna-demo")
true
\