Skip to content

Future: account activation and password reset by e-mail #12

Description

@MendesMat

Goal

Complete the account flows that start from an e-mail link: activating an account and resetting a forgotten password.

Scope

Operations of docs/product/features/authentication.md#operations:

  • checkLink(token, purpose) with purpose activation or reset; tokens always in the body (AUTH-20).
  • activateAccount: creates the password (AUTH-16) and makes the account active; the link is single-use and valid for 72 hours (AUTH-02, AUTH-03).
  • requestPasswordReset(login): only for existing active logins, link valid for 2 hours; the response is identical in content and duration whether or not the login exists, so the e-mail goes through the background queue of ADR-0030 (AUTH-10, AUTH-11, ADR-0031).
  • resetPassword: sets the new password and clears an active lockout (AUTH-12).
  • Expired or used links answer 410 link_invalid with the right message for each purpose.
  • Rate limiting on the reset request, per IP and per login (ADR-0023).

Done when

  • Integration tests: activation link works once; expires after 72 hours (fake TimeProvider); invalid after "resend access"; reset link expires after 2 hours; identical response for existing and unknown logins; reset clears lockout.
  • Messages verbatim from docs/product/features/authentication.md#messages.
  • Build with zero warnings, all tests pass; the milestone's roadmap items in README.md are checked.

References

docs/product/features/authentication.md, ADR-0019, ADR-0023, ADR-0030, ADR-0031.

Activity

  1. MendesMat commented on Sep 30, 2026

    @MendesMat
    OwnerAuthor

    Scope note carried over from the review of #8: sign-in refuses only Inactive accounts, while refresh refuses anything not Active. A pending account has no credential today, so it cannot sign in. If activation stores the password and activates the account in two separate saves, a failure between them would leave a pending account that can sign in. Decide in this plan whether activation is atomic, or whether sign-in also refuses Pending (and with which error, since docs/ does not say).

  2. changed the title [-]Account activation and password reset links[/-] [+]Future: account activation and password reset by e-mail[/+] on Oct 6, 2026
  3. MendesMat commented on Oct 6, 2026

    @MendesMat
    OwnerAuthor

    Adiada em 2026-10-05, não descartada. Os links de ativação e de redefinição de senha por e-mail voltam quando o ciclo do produto estiver fechado (decisão 21 e a seção "Antes de ir para o mundo real" de docs/decisoes-de-arquitetura.md).

    Por isso a issue saiu do milestone M1 e não bloqueia o fechamento dele. O corpo descreve o plano original e será revisto com /levantar-issue quando o assunto for retomado.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions