engin
12/06/2022, 8:18 AMrp
12/06/2022, 8:31 AMengin
12/06/2022, 8:40 AMrp
12/06/2022, 8:49 AMengin
12/06/2022, 8:55 AMurl: '/signinup/code/consume',
So if the request is for this path, then I know it is a "magic link user"?rp
12/06/2022, 11:42 AMengin
12/06/2022, 11:46 AM> body: {
> linkCode: 'tYySg...',
> preAuthSessionId: 'AVFnk...'
> },
wdyt?rp
12/06/2022, 11:49 AMengin
12/06/2022, 12:48 PMcreateCode()
, but I am having trouble seeing how to do that. I tried using the userContext
, but my data gets overwritten, so I don't see it on the server.
Any ideas?rp
12/06/2022, 1:09 PMengin
12/07/2022, 12:23 AMrp
12/07/2022, 4:03 AMengin
12/07/2022, 4:04 AMrp
12/07/2022, 4:06 AMengin
12/07/2022, 4:06 AMengin
12/07/2022, 4:07 AMrp
12/07/2022, 4:07 AMengin
12/07/2022, 4:08 AMrp
12/07/2022, 8:31 AMengin
12/07/2022, 8:33 AMrp
12/07/2022, 8:33 AMengin
12/07/2022, 8:33 AMrp
12/07/2022, 8:47 AMPasswordless.createCode({
email: "...",
options: {
preAPIHook: async (context) => {
let requestInit = context.requestInit;
let bodyStr = requestInit.body?.toString();
if (bodyStr !== undefined) {
let body = JSON.parse(bodyStr);
body = {
...body,
"customKey": "customValue"
}
bodyStr = JSON.parse(body);
}
context.requestInit.body = bodyStr
return context;
}
}
})
engin
12/07/2022, 11:15 AM?rid=passwordless&preAuthSessionId=xZri2I9tmjtyibDxoEsobH3ZVKfALRMuH29gO0dvlqU=#tXCnql1-v3QoSliniHhU2kbQTbMuz0k7LKFijzGzDwQ=
I suppose the sessionID is just the session ID, but would it be the anchor part of the URL after the "#" that is the secret (so in the example above, the part starting with "tXC")?rp
12/07/2022, 11:15 AMengin
12/07/2022, 11:15 AM