Repository navigation
Aditya Dhayapulay - Reject inactive accounts at secondary portal login - #2475
Open
adit24dhaya wants to merge 1 commit into
Open
adit24dhaya wants to merge 1 commit into
adit24dhaya wants to merge 1 commit into
Conversation
Require an existing active account before granting BM/Community Portal access. Return explicit authentication failures and a generic server error instead of an empty successful response. Found during the Phase 3 general-functionality access audit.
adit24dhaya
marked this pull request as ready for review
November 6, 2026 05:21
|
This branch has not been deployed
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.



Description
An account deactivated after main login could still gain secondary BM/Community Portal access with its existing token and password. Deleted accounts/server errors returned HTTP 200 with an empty/error response. Require a current active account and return explicit failures.
Original task request
HGN Phase III: Social Architecture — Deliverable 0, page 6. Original requirements: check that the person is active in Main and require secondary login with current credentials. Found during Aditya's assigned Phase 3 general-functionality E2E testing task; this does not complete the entire 60-hour assignment.
Related PRS (if any):
Frontend: OneCommunityGlobal/HighestGoodNetworkApp#5789. Test both branches for user-facing messages; merge backend first.
Main changes explained:
How to test:
/api/bm/loginwith that token and matching credentials: expect 403/401 and no token.npx jest src/controllers/bmdashboard/tests/bmLoginController.test.js --runInBand.Validation: 7 backend unit tests passed. Independent HTTP checks using the actual controller/JWT verifier/user model, real signing/password checks and disposable MongoDB passed 7 API cases, after reproducing the inactive-account and deleted-account failures before the fix. Paired browser checks passed 16 cases at 390/1280px. Babel build and changed-file lint pass (zero errors, two existing warnings).
Screenshots or videos of changes:
Note:
This secondary endpoint is shared by BM and Community Portal. No continuous token revocation, main-login policy change or event-level authorization redesign is included. Browser checks use actual auth startup/actions/reducer, portal login/gate and logout; main-token issuance and destination content are fixture-only. No shared writes, real notifications or manual deployments. Code/UI pictures and a short walkthrough are prepared locally in Week 6.