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 )

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

result, err := client.Query(
	f.Logout(true))

if err != nil {
	fmt.Fprintln(os.Stderr, err)
} else {
	fmt.Println(result)
}
true
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
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!