Get a token

Problem

You need to retrieve a token from the current database.

Solution

Use the Get function:

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

  •   bytesOut: 290

  • computeOps:   1

  •    readOps:   1

  •   writeOps:   0

  •  readBytes: 138

  • writeBytes:   0

  •  queryTime: 7ms

  •    retries:   0

Discussion

Once a key has been created, its secret is only displayed at that time. Afterwards, it is no longer possible to retrieve the key’s secret. If you have lost the secret associated with a key, delete the key and create a new one.

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!