What sign-in shows after the e-mail
Step 1 · The e-mail: POST /api/v3/auth/verify-email
Public endpoint (permission auth:verify-email). The e-mail is normalised (lowercase, trimmed) and the
lookup is exact and fails closed: a database error answers 500, never “does not exist” (ADR 0091).
Request
Anonymous response (main fields)
- A caller with a Horizon JWT whose confirmed e-mail owns the profile gets the full payload
(account, profile,
dni_validated,has_subscription_product_history, the account’screated_at, etc.) plusproviders. - The temporary server flag
authenticate-verify-email-anonymous-profile(formerly theAUTH_VERIFY_EMAIL_ANONYMOUS_PROFILEvariable),truein every environment until 2026-11-14, returns the full payload to everyone while older app versions need it; each use is logged asverify_email_anonymous_profile_compat. The production target isfalse.
Step 2 · The route table
The decision is a pure, unit-tested function on both clients (utils/verify-email-routing.ts in the
app, the e-mail step action in horizon-authenticate).
Two edge cases in the app:
- Confirmed login, no account and with a password (half-done e-mail registration): the app carries on with registration (document validation).
- Confirmed login, no account, no password and its provider’s flag is off: the app stays on the welcome screen, because there is no method to offer.
- MaihueGO app
- Web (horizon-authenticate)
- The routes after the e-mail are
email-sent,confirm-email,login-fullorlogin-anonymous(with password),sign-in-methodsinpasswordlessmode (no password) orfinish-registrationmode (half-done registration),validate-dniandstay. - The methods screen (
auth.sign-in-methods) replaces the old “stay” and “continue with Google” screens. - “Enviarme un enlace” leads to “Revisa tu correo”: “Te enviamos un enlace para entrar a MaihueGO. Vence en 1 hora y sirve una sola vez.” Resend unlocks after 60 seconds.
- When the app reopens without a session, the same logic decides where to resume.
verify-email fails in the app, a generic error is shown and the typed e-mail is kept.
”Forgot password” without a password
A login without a password cannot recover one. In that casePOST /api/v3/auth/recovery-account sends
the sign-in magic link instead of the recovery e-mail, with the same answer and the same on-screen
message. That way the screen does not reveal whether the account has a password. In the app:
Details in Password and
Magic link.
Step 3 · Password sign-in: POST /api/v3/auth/login/password
Permission auth:login-password. Body { "email": "…", "password": "…" }.
If the login still had
has_created_password set to false, a successful password sign-in fixes it
(best-effort). Every sign-in method ends in the same service (LogicCommonService.loginCommon), so the
payload is the same for password, provider and magic link.
Limits and the person’s IP
horizon-authenticate calls
verify-email, magic-link/request, login/password and recovery from the
server, so every call leaves from the same IP. That is why it sends the person’s real IP in
x-auth-client-ip together with x-auth-bff-token, and horizon-api only counts by that IP when the
token matches its AUTH_BFF_SERVER_TOKEN (ADR 0098). The IP is read from x-vercel-forwarded-for or
x-real-ip.
Accepted risk: enumeration
providers tells, for a given e-mail, which enabled provider it signs in with. That is extra
information about whether an account exists. It was accepted on purpose (ADR 0134): the endpoint is
rate-limited and returns no profile data to anonymous callers.