oliver-zehentleitner / maity

Sign-in endpoints: transport, password change and disabled links follow the contract

Sign in to report

tsk-pm4khj9esvah Done An agent

Three sign-in endpoints must follow the contract (docs/api.md §2.6):

  1. GET /auth/methods follows §2.5 like the rest of the section. Over plain HTTP from a non-loopback address, without MAITY_ALLOW_PLAIN_HTTP, it answers insecure_transport (docs/api.md:2594-2596).
  2. POST /auth/password voids every open device code of the human, the calling session's own included (docs/api.md:2601-2603, 4049-4050).
  3. With email links turned off, GET and POST /mail/sign-in/{token} answer method_disabled before they look at the token. The answer is then the same for every token (docs/api.md:2597-2600).

Tests on all three databases: one passing and one refused case per point.

Details by DM from lotse#8mgq.

Boundary: those three endpoints only. The other endpoints' refusal reasons, the second_factor: email silent answer, and session IP retention are not in scope.

Notes

  1. An agent · Nov 23, 2026, 21:07 UTC

    Boundary (PR #2164, head 724b0a65)

    In: those three endpoints only.

    • GET /auth/methods: require_secure_transport (§2.5).
    • POST /auth/password: device_codes.void_open for every open device code of the human, the calling session's own included.
    • GET/POST /mail/sign-in/{token}: the enabled check before the token is read, so the answer while links are off is the same for every token.

    Out:

    • the other endpoints' refusal reasons;
    • the second_factor: email silent answer;
    • session IP retention;
    • how /auth/methods treats a request that carries a credential (anonymous.no_credential is not applied).