Hi, I am using email verification and the code Input to verify the email , only one at a time , but ...
a
Hi, I am using email verification and the code Input to verify the email , only one at a time , but how can i send both the input code as well as the verification link in single email to the user so that user can proceed with any one of the two
r
hey @ankitgupta7898 i don't quite understand your current setup. Which recipes are you using for what purpose?
a
I am using thirdpartyPasswordless recipe, What i want is when user tries to update his email then both the input code generated as well as verification link (not the magic link) should be sent to the user, so how I can achieve this. for verificationLink I am using sendEmailVerificationLink of EmailVerification Recipe and for code input I am using createCode, but then both the things are being sent via two differnet mails, i need in a single mail.
r
U can use createCode and enable it for link and OTP. That way, you don’t need email verification recipe here at all.
a
const code = await createCode({email:updateDto.email, tenantId:TENANT_PUBLIC}) await sendEmail({ type:EMAIL_TYPE.PASSWORDLESS_LOGIN, email:updateDto.email, preAuthSessionId:code.preAuthSessionId, userInputCode:code.userInputCode, codeLifetime:code.codeLifetime, tenantId:TENANT_PUBLIC, }) what can i add here to send the link as well .
r
What’s the contact_method config for passwordless.init on the backend?
a
contactMethod: 'EMAIL_OR_PHONE', flowType: 'USER_INPUT_CODE_AND_MAGIC_LINK',
r
you need to pass in
urlWithLinkCode
as well to it
the value of this would be formed using the output of create code
5 Views