Skip to content

refactor(architecture): split the 796-line auth_handler.go into focused sub-handlers #155

Description

Summary

internal/api/handler/auth_handler.go (796 lines) implements 20+ auth flows in one file: register/verify, login, passkey, TOTP, recovery, sessions, wallet init, nonce. It also contains wallet-seed derivation and passkey-pepper helpers (lines 734-766) that belong in a domain service.

Acceptance Criteria

  • Split into focused handlers (registration, passkey, totp, recovery, sessions, wallet-init)
  • Move crypto/seed-derivation helpers into the wallet/auth domain services
  • No change to public route/response contracts
  • Existing auth tests + integration tests pass

Complexity

High — broad surface, must preserve HTTP contracts.

Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave programarchitectureArchitecture and designfeatureFeature to implementhigh-complexityHigh-complexity backend task requiring deep architectural workrefactorCode restructuring and consolidation

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions