Skip to content

Feature: Complete Persisted Registration and Login #128

Description

@3m1n3nc3

Description

Finish registration and login against persisted users with normalized contracts and no mock helpers.

File Location

learnault-api/src/controllers/auth.controller.ts, auth service/schemas/routes, and integration tests

Design Reference

API Roadmap Phase 1: Complete Persisted Registration and Login.

Dependencies

Tasks

  • Move hashing and token issuance into an auth service
  • Normalize email/username and enforce uniqueness transactionally
  • Return standard responses without password/internal fields
  • Record login and safe security audit events
  • Handle validation, duplicates, invalid credentials, disabled accounts, and races
  • Add service/controller/integration tests

Acceptance Criteria

  • Persisted learners can register and log in
  • Duplicate/invalid responses use stable non-enumerating codes
  • Passwords never enter responses or logs
  • Concurrent duplicate registration creates at most one user
  • Tests and OpenAPI pass

Verification Evidence

  • Attach redacted curl examples and passing auth integration tests

Difficulty

Advanced

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions