Repository navigation
fix(auth): multi-account Telegram switching guidance, fail-closed WhatsApp offline UI, and OTP state remediation - #48
Merged
Satelink-Protocol merged 1 commit intoNov 15, 2026
Conversation
…tsApp offline UI, and OTP state remediation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of Audit & Remediation
This PR resolves the critical sign-in audit findings across Telegram multi-account handling and WhatsApp production fail-closed behavior:
1. Telegram Multi-Account & Cross-Origin Session Resolution (Objective A)
oauth.telegram.organd reads Telegram's cross-origin cookies. If the browser has an active Telegram Web or widget session, Telegram identifies that user. NIGHTLIFEZ does not hardcode 'Pradeep', usernames, or user IDs.idvalidated via HMAC-SHA256 signature usingBOT_TOKEN. The backend accepts any valid Telegram user ID, matches existing accounts, registers new users, and isolates accounts (User A cannot access User B).2. WhatsApp Production Fail-Closed & Offline UI (Objective B)
isWhatsAppAvailable()check that enforces fail-closed behavior in production (HTTP 503whatsapp_unavailable) when Meta Cloud API credentials are absent.3. Consent & Stale OTP State Remediation (Objective C)
.otp-box { display: grid; }overrode browser[hidden]styling. Added[hidden] { display: none !important; }and.otp-box[hidden] { display: none !important; }.+91 98****1234from HTML templates.memberPageverifies active unexpiredsm_wa_stepchallenge before rendering OTP step. Direct visits to/signin?step=otpwithout an active challenge safely default to phone step.sm_wa_stepcookie, and reveals the phone form.4. Automated Test Suites & Verification
test/multi-account-telegram-and-whatsapp-audit.test.js(100% pass)test/signin-security-privacy.test.js(100% pass)telegram-*.test.jsandauth.test.js(100% pass)whatsapp-*.test.js(100% pass)e2e/auth-audit.spec.js(100% pass), 6/6 ine2e/whatsapp-auth.spec.js, 4/4 ine2e/promotional-campaigns.spec.js