Query.identity()

Get the current identity.

Signature

Query.identity() => Document | String | Null

Description

Gets the identity of a caller making a query in the current session.

Parameters

None

Return value

One of:

Type Description

Document

The identity document.

Null

When there is no identity in the current session, this method returns Null.

Examples

Query.identity()
{
  id: "371264255805095970",
  coll: People,
  ts: Time("2023-07-25T22:27:15.410Z"),
  name: "Alice Jones",
  email: "ajones@gmail.com"
}

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!