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
\