Skip to content

feat: anonymous self-signup with email-domain allow-list #62

@martinydeAI

Description

@martinydeAI

Tracked under ADR 004 (#60).

Add the anonymous self-signup endpoint that lets a representative of
an approved organisation create their own pending account.

Scope

  • New public route /register (no security required).
  • Twig form: email, password, password confirmation, name.
  • E-mail domain must match an entry in the REGISTRATION_ALLOWED_EMAIL_DOMAINS
    env var (comma-separated). Submissions with an unknown domain are
    rejected with a localised error on the form.
  • On success, create a User with status = UserStatus::Pending
    (entity work tracked in feat: add User entity with active / domainManager / name fields #45 — coordinate so this lands after the
    status enum is in place).
  • Show a "thanks, waiting for approval" page (or redirect to /login
    with a flash) — the user cannot sign in yet because the
    UserCheckerInterface from the sibling issue blocks pending logins.
  • Smoke + unit tests covering:
    • allow-listed domain → user created with Pending status
    • non-allow-listed domain → rejected with form error
    • password mismatch / empty password rejected

Out of scope

  • Email verification — separate decision if/when we need it.
  • CAPTCHA / rate limiting — defer; flag if abuse becomes an issue.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request
    No fields configured for Feature.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions