Identity

Copied!
()

Description

The Identity function returns the ref of the document associated with the authentication token used for the request. If a document does not exist, an error is returned.

Parameters

None.

Returns

A reference type to the identity associated with the current client authentication token.

Examples

Copied!
client.query(q.())
.then((ret) => console.log(ret))
(id=181388642114077184, collection=(id=characters, collection=(id=collections)))

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!