Create a token
Solution
Use the Login
function:
ObjectV(ref: RefV(id = "309834562535424512", collection = RefV(id = "tokens")),ts: LongV(1631740114630000),instance: RefV(id = "181388642114077184", collection = RefV(id = "characters", collection = RefV(id = "collections"))),secret: StringV(fnEETMDknxACAARMwOIEYAYAhr4xpyR13i1E4TokiFwAYsPz0LE))
map[instance:{181388642114077184 0xc000109bc0 0xc000109bc0 <nil>} ref:{309834289381376512 0xc000109a10 0xc000109a10 <nil>} secret:fnEETMClBdACAARMwKQSgAIAKgw15g2WZCeCm3bkvhfEzvWDmpI ts:1631739854140000]
{ref: ref(id = "309834736999596544", collection = ref(id = "tokens")), ts: 1631740281020000, instance: ref(id = "181388642114077184", collection = ref(id = "characters", collection = ref(id = "collections"))), secret: "fnEETMENPfACAARMwQoysAYAe-Q6mGG3S3glkNI8g0MICqKvQzA"}
{
ref: Ref(Tokens(), "309833836335727104"),
ts: 1631739422080000,
instance: Ref(Collection("characters"), "181388642114077184"),
secret: 'fnEETMA7ijACAARMwDsk0AYAu4E51VmH1w-Xm7qk8T6eJcbinkI'
}
{'ref': Ref(id=309834127742337536, collection=Ref(id=tokens)), 'ts': 1631739699980000, 'instance': Ref(id=181388642114077184, collection=Ref(id=characters, collection=Ref(id=collections))), 'secret': 'fnEETMB_Y2ACAARMwH7g0AYAw183rIQzi0_4AnRBYTUf15JxUg8'}
{
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:
ObjectV(ref: RefV(id = "309834558324343296", collection = RefV(id = "tokens")),ts: LongV(1631740110630000),instance: RefV(id = "181388642114077184", collection = RefV(id = "characters", collection = RefV(id = "collections"))),secret: StringV(fnEETMDjpBACAARMwOIEYAYAO2NCSaJssZSdlcXUlgZmw70FnfE))
map[instance:{181388642114077184 0xc000180660 0xc000180660 <nil>} ref:{309834288701899264 0xc0001804b0 0xc0001804b0 <nil>} secret:fnEETMCk3VACAARMwKQSgAIAs-uMMiwCOxE2LCTVOI0ssKbxa5U ts:1631739853490000]
{ref: ref(id = "309834731615158784", collection = ref(id = "tokens")), ts: 1631740275890000, instance: ref(id = "181388642114077184", collection = ref(id = "characters", collection = ref(id = "collections"))), secret: "fnEETMEL_QACAARMwQoysAYA1P90wsUVdPW8JfT3PeM9-wm3umE"}
{
ref: Ref(Tokens(), "309833836087214592"),
ts: 1631739421850000,
instance: Ref(Collection("characters"), "181388642114077184"),
secret: 'fnEETMA7e2ACAARMwDsk0AYATF1jLijRmK7HYAZDxe1snLrPWJs'
}
{'ref': Ref(id=309834127428813312, collection=Ref(id=tokens)), 'ts': 1631739699690000, 'instance': Ref(id=181388642114077184, collection=Ref(id=characters, collection=Ref(id=collections))), 'secret': 'fnEETMB_ULACAARMwH7g0AYASH2StILhxeWQQeZ709pMTxfYU-o'}
{
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!