feat: Issue #751 - SMS/Email delivery infrastructure#45
feat: Issue #751 - SMS/Email delivery infrastructure#45theothersideofgod wants to merge 6 commits into
Conversation
The server's API middleware requires X-Database-Id header along with X-Meta-Schema to build the correct cache key for routing meta schema requests. Without databaseId, the server returns 404 with "No valid schemas found" error. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…ordless auth Support both function naming and DB procedure naming for email types: - magic_link_sign_in/magic_link_sign_up + magic_link_email (DB) - email_otp/email_mfa_setup/mfa_challenge + email_otp_code/mfa_verification_code (DB) - account_deletion (DB) Also accept both field naming conventions: - magic_link_token + token (DB) - otp_code + code (DB) This ensures end-to-end compatibility with DB procedures that queue email jobs via app_jobs.add_job(). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add new serverless function for sending SMS verification codes. Supports multiple providers (Twilio, AWS SNS, Vonage) with stub mode for development. Handles sign-in OTP, sign-up verification, MFA setup, and phone verification flows. Includes unit tests (6 passing). Part of Issue #751: Email & SMS Delivery for Magic Links, OTP, MFA Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implement actual Twilio API integration with proper error handling. Adds unit tests for Twilio success, missing credentials, and API errors. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add k8s/base/functions/send-sms.yaml with secretRef to twilio-credentials - Update kustomization.yaml to include send-sms function - Add twilio-credentials to required secrets documentation Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
Summary
Issue #751: Email & SMS Delivery for Magic Links, OTP, MFA
This PR implements the complete delivery infrastructure for passwordless authentication flows.
Supported Types
SMS Delivery (
send-sms)sign_in_sms_otpsign_up_smsenable_sms_mfamfa_challenge_smsphone_verificationsms_otp_codemfa_verification_codeEmail Delivery (
send-verification-link)forgot_passwordmagic_link_sign_inmagic_link_sign_upemail_otpemail_mfa_setupmfa_challengemagic_link_emailemail_otp_codemfa_verification_codeChanges
SMS Delivery (Twilio)
functions/send-sms/handler.tsfunctions/send-sms/handler.jsonk8s/base/functions/send-sms.yamltwilio-credentialssecretRefk8s/base/kustomization.yamlEmail Delivery Enhancements
functions/send-verification-link/handler.tsRuntime Fixes
packages/fn-runtime/Refactoring & Security
86719b15f0ee964914d21K8s Deployment
Before deploying, create the Twilio secret:
Error Handling
Twilio credentials not configuredUnknown sms_type: <type>orUnknown email_type: <type>Test Plan
Related PRs
🤖 Generated with Claude Code