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.

token.exists()

Learn: Tokens

Test if a token exists.

Signature

exists() => true

Description

Tests if a token, represented as an Token document, exists.

A token is a type of authentication secret used to provide identity-based access to a Fauna database. Fauna stores tokens as documents in the Token system collection.

Parameters

None

Return value

Type Description

Boolean

If true, the Token document exists. If false, the Token document doesn’t exist.

Examples

Token.byId("401671202234433613")!.exists()
true

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!