FQL v4 will be decommissioned on June 30, 2025. Ensure that you complete your migration from FQL v4 to FQL v10 by that date.

For more details, review the migration guide. Contact support@fauna.com with any questions.

Logout

This reference topic applies to FQL v4. Go to this page for the latest FQL v10 reference topics.

Logout( all_tokens )
logout( all_tokens )
Logout( all_tokens )
Logout( all_tokens )
Logout( all_tokens )

Description

The Logout function deletes all tokens associated with the current identity if its parameter is true, or just the token used in this request otherwise.

Parameters

Parameter Type Definition and Requirements

all_tokens

Boolean

When set to true, all authentication tokens for the current identity are deleted. When set to false, only the token used during the Logout query is deleted.

Returns

A boolean value indicating whether the logout was successful or not. A value of true indicates that the token or tokens are no longer valid. A value of false means Logout was called with a key and so there’s no way for tokens to be invalidated.

Examples

client.query(
  q.Logout(true)
)
.then((ret) => console.log(ret))
.catch((err) => console.error(
  'Error: [%s] %s: %s',
  err.name,
  err.message,
  err.errors()[0].description,
))
true
result = client.query(
  q.logout(True)
)
print(result)
True
result, err := client.Query(
	f.Logout(true))

if err != nil {
	fmt.Fprintln(os.Stderr, err)
} else {
	fmt.Println(result)
}
true
try
{
    Value result = await client.Query(
        Logout(true)
    );
    Console.WriteLine(result);
}
catch (Exception e)
{
    Console.WriteLine($"ERROR: {e.Message}");
}
BooleanV(True)
Logout(true)
true
Query metrics:
  •    bytesIn:   15

  •   bytesOut:   17

  • computeOps:    1

  •    readOps:    0

  •   writeOps:    1

  •  readBytes:  300

  • writeBytes:  418

  •  queryTime: 73ms

  •    retries:    0

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!