Skip to content

Fix auth controller auto-registering any wallet address without verification #541

Description

@Wilfred007

What

The login endpoint auto-registers any Stellar wallet address as a new EMPLOYEE user with no verification, no email, no organization assignment. New users have organizationId: undefined and can't use any features.

Why

Any Stellar address can register and get a JWT token. There's no invitation flow, no admin approval. The comment says "For demo purposes" but this is in the production controller.

Scope

In scope: Add invitation-based registration, require organization assignment, remove auto-register
Out of scope: Full KYC flow

Acceptance Criteria

  • Registration requires valid invitation token
  • New users assigned to an organization
  • No auto-registration of arbitrary wallet addresses
  • Invalid invitation returns 403

Technical Context

  • backend/src/controllers/authController.ts lines 163-224 — auto-register
  • backend/src/services/authService.ts — auth logic

Activity

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

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardThird CampaignCampaign: Third CampaignbackendBackend developmenthardComplex taskssecurityIssues related to application security and audits

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions