rp
03/27/2022, 8:21 PMshorthair_[]
03/27/2022, 8:22 PMrp
03/27/2022, 8:24 PMFrAgOrDiE
03/28/2022, 9:58 AMts
Passwordless.init({
flowType: 'MAGIC_LINK',
contactMethod: 'EMAIL',
createAndSendCustomEmail: async (input, context) => {
console.log('sent email', input, context);
},
}),
- having this as passwordless recipe configuration, this -
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/4C4djB1Cb573Tajin
03/28/2022, 10:26 AMrp
03/28/2022, 10:27 AMTajin
03/28/2022, 10:32 AMVersion467
03/28/2022, 11:13 AMnkshah2
03/28/2022, 11:23 AMTajin
03/28/2022, 11:27 AMrp
03/28/2022, 11:28 AMrp
03/28/2022, 11:29 AMfsimoes
03/28/2022, 11:37 AMFrAgOrDiE
03/28/2022, 12:02 PMTajin
03/28/2022, 2:05 PM/*
* Called to sign-up a new user
*
* @params: email
* password
*
* @returns: "OK": on successfully signing up the user
* "EMAIL_ALREADY_EXISTS_ERROR": if the email is already been used
*/
signUp(input: {
email: string;
password: string;
}): Promise<{ status: "OK"; user: User } | { status: "EMAIL_ALREADY_EXISTS_ERROR" }>;
pepegc
03/28/2022, 7:57 PMporcellus
03/28/2022, 8:22 PMJadBlackstone
03/29/2022, 8:41 AMFrAgOrDiE
03/29/2022, 1:00 PMts
Passwordless.init({
flowType: 'MAGIC_LINK',
contactMethod: 'EMAIL',
createAndSendCustomEmail: async (input, context) => {
console.log('email sent', input, context); //pretending I'm sending an email
// outputs
// email sent {
// codeLifetime: 7200000,
// email: 'test4@revodigital.it',
// preAuthSessionId: 'hAJ3OURx4rtUb4ylrheRZm0ADBEwJ8KD8rYsb__yIqQ=',
// urlWithLinkCode: 'http://localhost:3012/auth/verify?rid=passwordless&preAuthSessionId=hAJ3OURx4rtUb4ylrheRZm0ADBEwJ8KD8rYsb__yIqQ=#CO7FrG4PX6cpoYeOdGxuFQ9pbjJFilDs2mGK08wdNMo=',
//userInputCode: undefined
//} {}
},
}),
Should I create an endpoint handling /auth/verify
? How would I get the linkCode then?nkshah2
03/29/2022, 1:07 PMFrAgOrDiE
03/29/2022, 1:13 PM/auth/signinup/code
2. Backend sends email to user -> URL contains preAuthSessionId andlinkCode
Are these two steps correct? If yes, what is the user supposed to do with the email?PitchAsh
03/29/2022, 1:20 PMPitchAsh
03/29/2022, 3:29 PMrp
03/29/2022, 4:41 PMPitchAsh
03/29/2022, 6:01 PMrp
03/29/2022, 6:01 PMrp
03/29/2022, 6:02 PMrp
03/29/2022, 6:02 PMrp
03/29/2022, 6:03 PM