Skip to content

feat(auth): private WhatsApp OTP bridge for NIGHTLIFEZ - #66

Open
Satelink-Protocol wants to merge 3 commits into
mainfrom
feature/nightlifez-whatsapp-otp-bridge
Open

Satelink-Protocol wants to merge 3 commits into
mainfrom
feature/nightlifez-whatsapp-otp-bridge

Conversation

@Satelink-Protocol

Copy link
Copy Markdown
Contributor

Summary

  • Add a private, server-to-server endpoint for NIGHTLIFEZ phone verification delivery.
  • Keep Meta WhatsApp access token, phone number ID, API version, and approved OTP template inside this project's own Vercel Production environment; no credential export or duplication.
  • Require a separate high-entropy NIGHTLIFEZ_OTP_DELIVERY_SECRET bearer token for both the send and readiness endpoints.
  • Validate normalized E.164 phone, six numeric digits, and bounded request ID before calling Meta.
  • Never log or return OTP codes or Meta credentials; logs contain only a masked phone and request ID.
  • Readiness endpoint returns booleans only and is also protected by the shared secret.

Validation

  • node --check lib/handlers/nightlifez-otp.js — passed
  • node --check test/nightlifez-otp-bridge.test.js — passed
  • node --test test/nightlifez-otp-bridge.test.js — 2 passed
  • npm run lint — passed (238/238 files)
  • Full npm test — cannot run in this sandbox because this repository's integration tests require a local PostgreSQL server at 127.0.0.1:5432; the DB service is not running here. The failures were connection refused, not bridge test failures.

Deployment safety

  • No changes to existing Meta credentials, WhatsApp webhook secrets, or current WhatsApp authentication routes.
  • No live OTP messages sent during tests.
  • Do not configure NIGHTLIFEZ to use this endpoint until this PR is merged/deployed and its protected readiness endpoint confirms that the Meta account and OTP template are live.

@vercel

vercel Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
strangersmeetup Ready Ready Preview Nov 28, 2026 4:08pm UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants