Create a token
Solution
Use the Login
function:
{
ref: Ref(Tokens(), "309833029179671040"),
ts: 1631738652300000,
instance: Ref(Collection("characters"), "181388642114077184"),
secret: 'fnEETL9_m_ACAARMv36xQAYA0e8RzC8kR9TQDLEM5tEpq79-w_M'
}
You can also create one directly, if the identity document does not have
any credentials
defined:
{
ref: Ref(Tokens(), "309833028300964352"),
ts: 1631738651480000,
instance: Ref(Collection("characters"), "181388642114077184"),
secret: 'fnEETL9_Z5ACAARMv36xQAYAsGq8dFWhaBsypurs5u8qAN6Zfm8'
}
The token’s secret is only ever shown once, in the response
from the Login function. If you lose the secret,
delete the token and create a new one.
|
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!