Credential.firstWhere()
Learn: Credentials |
---|
Get the first credential that matches a provided predicate.
Description
Gets the first credential,
represented as a Credential
document, that matches a provided
predicate function.
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 |
---|---|---|---|
pred |
Yes |
Anonymous predicate function that:
The method returns the first |