I'm setting up the backend with NestJS and testing...
# support-questions
f
I'm setting up the backend with NestJS and testing it with Postman: https://prnt.sc/Ra6_sAz02hYG - I can correctly start a new flow.
Copy code
ts
Passwordless.init({
 flowType: 'MAGIC_LINK',
 contactMethod: 'EMAIL',
 createAndSendCustomEmail: async (input, context) => {
  console.log('sent email', input, context);
 },
}),
- having this as passwordless recipe configuration, this -
Copy code
sent email {
  codeLifetime: 900000,
  email: 'test4@revodigital.it',
  preAuthSessionId: '4M1rdHhXRMuckNDhGmqTM-rZ6I_kyqR1i_WnOGr8eT4=',
  urlWithLinkCode: 'https://revodigital.it/auth/verify?rid=passwordless&preAuthSessionId=4M1rdHhXRMuckNDhGmqTM-rZ6I_kyqR1i_WnOGr8eT4=#WHC1Jc6GlQ_awnN1A3o_LB7lpC0JOpY85MHWxcZLLVM=',
  userInputCode: undefined
} {}
is the
console.log
output. I seem to understand that urlWithLinkCode's preAuthSessionId parameter is returning
{preauthSessionId}#{linkCode}
, formatted as shown because as you can see - https://prnt.sc/a49KsLwwca-R - it's the only way it works. https://prnt.sc/O0rDyAlOnrDc Is this an issue? Is it known? Another question is, shouldn't I get cookies as a response? https://prnt.sc/7rq7gDL4Lp0- / https://prnt.sc/4C4djB1Cb573
r
hey!
I'm not quite sure I understand your question
and yes, you should get cookies. What does the header section say? And what is the value of
{{baseURL}}
?
f
the first question is, where do I get the linkCode?
r
> where do I get the linkCode? The link code is not returned in the JSON response. It get's sent as part of the magic link to the user's email - in this case, you are console logging it in
createAndSendCustomEmail
f
Ok that works,
yeah ok
I do get the cookie headers
r
ok great