Getting the following error when trying to send a verification e-mail: ```[INFO] 05:38:57 ts-node-d...
c

corgitaco

almost 2 years ago
Getting the following error when trying to send a verification e-mail:
[INFO] 05:38:57 ts-node-dev ver. 2.0.0 (using ts-node ver. 10.9.2, typescript ver. 4.9.5)
API Server listening on port 3001
Error: 140384285034368:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:332:
where my smtp settings are:
ts
let smtpSettings = {
    host: "mail.privateemail.com",
    authUsername: "no-reply@website.com",
    password: "password",
    port: 587,
    from: {
        name: "Website No Reply",
        email: "no-reply@website.com"
    },
    secure: true
}
Tried switching to port 465 as well but that times out the connection w/ a 504 error and has the following server side error after 2 minutes:
Error: Connection timeout
    at SMTPConnection._formatError (/app/node_modules/nodemailer/lib/smtp-connection/index.js:790:19)
    at SMTPConnection._onError (/app/node_modules/nodemailer/lib/smtp-connection/index.js:776:20)
    at Timeout.<anonymous> (/app/node_modules/nodemailer/lib/smtp-connection/index.js:235:22)
    at listOnTimeout (internal/timers.js:557:17)
    at processTimers (internal/timers.js:500:7)
I tried testing it in java like so and this does work: Ran some [tests]() on . so not sure what I'm doing entirely wrong on the NodeJS back end not sure if relevant at all but I am using NameCheap's mail service (
privateemail.com
) with the DNS handled through Cloudflare. Followed the instructions Namecheap provides [here]() & [here]() Hope that's everything you might need to assist me with my issue
Hi there, I’ve got a question around recipe user id usage for email verification please as I’m not s...
d

david_61794

about 2 years ago
Hi there, I’ve got a question around recipe user id usage for email verification please as I’m not sure if there is a bug in
getUser
or I just don’t understand how user id mapping is supposed to work between recipe user ids and external ids. Currently we’re mapping our users to an external id with
createUserIdMapping
after signing them up. We then verify their emails using the external id as it’s the id returned by calling
getUser
. Once the email is verified, a row is added to
emailverification_verified_emails
with the external user id as the
user_id
in the database. This works well as the email verification claim
st-ev
is
true
in the access token jwt and if I call
isEmailVerified
with the external user id converted to a recipe user id then it returns true.
The problem seems to be with
getUser
as it returns a list of
loginMethods
but the
verified
flag is false even though
isEmailVerified
returns true if I check using the same
recipeUserId
and email returned in the login method. The email verification claim for this user is
true
in the access token too. However if I change the logic to verify the email based on the supertokens user id instead, then
getUser
will return the login method
verified
as true but the email verification claim
st-ev
is false. I may be misunderstanding how the different ids are supposed to be used but it seems like
getUser
may be returning the verification status of the email login method incorrectly please?