Get a token
Solution
Use the Get
function:
ObjectV(ref: RefV(id = "1", collection = RefV(id = "tokens")),ts: LongV(1631740104780000),instance: RefV(id = "1", collection = RefV(id = "users", collection = RefV(id = "collections"))),hashed_secret: StringV($2a$05$ido9qqXfQ.KjpZQLfGqYJup/kilkj9Vqka3Yuzx//oPpjsJw69QHO))
map[hashed_secret:$2a$05$a77WPbm2U.Ms6GSw6oNp5uOZMefME5e.hLQxIhsgh/h2ceKQpxS8W instance:{1 0xc000180660 0xc000180660 <nil>} ref:{1 0xc0001804b0 0xc0001804b0 <nil>} ts:1631739851370000]
{ref: ref(id = "1", collection = ref(id = "tokens")), ts: 1631740269380000, instance: ref(id = "1", collection = ref(id = "users", collection = ref(id = "collections"))), hashed_secret: "$2a$05$iJNG63lEeIwJum933SCCee/lqssvYlETxzVOiUeWK/BiLazjGsbgC"}
{
ref: Ref(Tokens(), "1"),
ts: 1631739421230000,
instance: Ref(Collection("users"), "1"),
hashed_secret: '$2a$05$HgbE0YEse2i7.5F4a5MHm.wGDmk4C3kMrP7NJpP40GrO06DgP584q'
}
{'ref': Ref(id=1, collection=Ref(id=tokens)), 'ts': 1631739698710000, 'instance': Ref(id=1, collection=Ref(id=users, collection=Ref(id=collections))), 'hashed_secret': '$2a$05$HExlDNKKmJP69pnpzVmf1.nsTDOJ5FbgfwUv9z1CXg./nQBsT70ny'}
{
ref: Ref(Tokens(), "1"),
ts: 1631738649530000,
instance: Ref(Collection("users"), "1"),
hashed_secret: '$2a$05$jr3cTMQcY.mKNNizVlQIZOpIC3wVjvxuse93/FDw9A9JbX9.9lIoy'
}
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.
Was this article helpful?
We're sorry to hear that.
Tell us how we can improve!
Visit Fauna's forums
or email docs@fauna.com
Thank you for your feedback!