Skip to content

[Test] Invite Code (M0 Critical Path) #214

@wanghuan-520

Description

@wanghuan-520

Background

NyxID M0 goal: first external user (deadline 2026-04-18).
External users are identified via invite code registration.
Invite code is on the M0 critical path.

Test Scope

Code Generation

  • Admin can generate invite codes
  • Code format is correct and shareable
  • Admin can set max uses for invite codes
  • Admin can deactivate invite codes
  • Admin can view invite code usage records in the UI

Registration Flow

  • User must provide an invite code during registration
  • External user can register successfully with a valid invite code
  • Registration is rejected when the invite code is missing
  • Registration is rejected when the invite code is invalid
  • Registration is rejected when the invite code is exhausted
  • Registration is rejected when the invite code is deactivated
  • Invite code usage is only counted after registration succeeds

Code State

  • Single-use code cannot be reused after first successful registration
  • Code with max uses = 10 is rejected on the 11th successful registration attempt
  • Code usage count is updated after successful registration
  • [~] Code usage is traceable: API returns user_id and used_at, but the admin UI has no visible usage-record entry

Related

  • M0 deadline: 2026-04-18

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions