You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In PR #4551 (swap SendGrid with SMTP), the SuperTokens passwordless OTP path was wired to passwordless.SMTPService via get_passwordless_email_delivery(). The SuperTokens SMTPSettings only exposes a secure flag (mapped from SMTP_USE_SSL), whereas the shared email_service._send_smtp_email separately honors SMTP_USE_TLS to conditionally call starttls().
As a result, when SMTP_USE_SSL=false and SMTP_USE_TLS=false, the SuperTokens transporter still silently attempts STARTTLS (falling back to plaintext only if unsupported), while the shared email service skips STARTTLS entirely.
A log warning was added in #4551 to surface this discrepancy, but the root divergence remains.
Goal
Implement a custom SuperTokens EmailDeliveryOverrideInput for the passwordless recipe that internally delegates to email_service._send_smtp_email(). This would:
Fully respect both SMTP_USE_TLS and SMTP_USE_SSL for passwordless OTP emails, matching the shared email service behavior exactly.
Replace the current passwordless.SMTPService usage in get_passwordless_email_delivery().
Background
In PR #4551 (swap SendGrid with SMTP), the SuperTokens passwordless OTP path was wired to
passwordless.SMTPServiceviaget_passwordless_email_delivery(). The SuperTokensSMTPSettingsonly exposes asecureflag (mapped fromSMTP_USE_SSL), whereas the sharedemail_service._send_smtp_emailseparately honorsSMTP_USE_TLSto conditionally callstarttls().As a result, when
SMTP_USE_SSL=falseandSMTP_USE_TLS=false, the SuperTokens transporter still silently attempts STARTTLS (falling back to plaintext only if unsupported), while the shared email service skips STARTTLS entirely.A log warning was added in #4551 to surface this discrepancy, but the root divergence remains.
Goal
Implement a custom SuperTokens
EmailDeliveryOverrideInputfor the passwordless recipe that internally delegates toemail_service._send_smtp_email(). This would:SMTP_USE_TLSandSMTP_USE_SSLfor passwordless OTP emails, matching the shared email service behavior exactly.passwordless.SMTPServiceusage inget_passwordless_email_delivery().References
Requested by
@Shunmuka