Delete a token

Problem

You need to delete a token from the current database.

Solution

Use the function:Delete[] function:

Copied!
(((), '1'))
{
  ref: ((), "1"),
  ts: 1631738655590000,
  instance: (("users"), "1"),
  hashed_secret: '$2a$05$jr3cTMQcY.mKNNizVlQIZOpIC3wVjvxuse93/FDw9A9JbX9.9lIoy',
  data: { team: 'Marketing' }
}
Query metrics:
  •    bytesIn:   43

  •   bytesOut:  318

  • computeOps:    1

  •    readOps:    0

  •   writeOps:    1

  •  readBytes:  303

  • writeBytes:  439

  •  queryTime: 15ms

  •    retries:    0

Discussion

Once a key has been deleted, any client still using the key’s secret can no longer execute queries.

More information

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!