Skip to main content
There are two magic links. The sign-in magic link is new in 2026.11.3: any login without a password gets it, on MaihueGO and on the web (ADR 0134). The onboarding magic link is its older sibling: it activates the account of a customer invited from the portal (ADR 0095). Both are consumed with a POST from the client, never with a plain GET from the e-mail.
Status. The sign-in magic link ships in PR #1960 (merged into develop on 2026-11-05) with 2026.11.3, with no flag. The exit check is manual test MT-06 on iOS and Android.
Only a login with an account and no password: typically someone who registered with Google, Apple or Microsoft (ADR 0132), a migrated account or a contract signer. It can be requested in two ways:
  • The «Enviarme un enlace» button on the methods step, after the e-mail.
  • «Olvidé mi contraseña» when the login has no password: the magic link arrives instead of the recovery e-mail, with the same on-screen answer.

1 hour

The link expires after one hour. In Supabase, MAILER_OTP_EXP = 3600 seconds in all three environments.

Single use

A link already used answers 410 link-expired.

Resend after 60 s

The «Revisa tu correo» screen unlocks resend after 60 seconds.

Step by step

1

E-mail and methods

The person types their e-mail. verify-email says it has an account and no password, and the app shows «Este correo no tiene contraseña», the buttons of the enabled providers and «Enviarme un enlace». With no provider, only the link is offered.
2

Request the link

The app calls POST /api/v3/auth/magic-link/request with origin: "app" and opens «Revisa tu correo».
3

Open the e-mail

The link is a universal link on the portal host (https://portal.maihuego.com/redirect?... in production). With the app installed, the system opens MaihueGO directly.
4

Consume and enter

The app sends the token_hash to POST /api/v3/auth/magic-link/login, stores the session and opens Home.
The magic link never bypasses 2FA. Today the gate is inert: the authenticate-two-factor-ui flag is off in every environment and there is no second-factor backend. See Sessions and SSO.
An expired or used link leads to a screen that offers to ask for a new one from the e-mail step.

Endpoints

Limits

magic-link-request is always enforced, even when the authenticate-rate-limit-mode flag is off.

Template and event

The e-mail is the notification event auth.sign-in.magic-link-requested (domain auth, gateway horizon-auth, in the person’s language, es and en templates at minimum). It is in the security category: it cannot be opted out of and ignores quiet hours. The template is inserted by notification:template-sync or on first send. The onboarding link keeps its event auth.magic-link.requested.

Apple hidden e-mail

If the person chose «Hide My Email», their login is an @privaterelay.appleid.com address (is_private_email = true). Apple only forwards mail from domains registered in Sign in with Apple for Email Communication: if the sender domain or the Resend return-path is missing, the magic link bounces and that person cannot sign in without a password. See Rollout.
A mail scanner that runs JavaScript can consume a link before the person does. ADR 0134 accepts this risk: asking for another link is enough.
This is the link in customer-portal invitations.
  1. E-mail «Activa tu cuenta Maihue» with the «Activar mi cuenta» button and the 24-hour notice.
  2. The button opens /es/onboarding/activate?ref=...&token_hash=... on the portal. The page sends a single POST, removes token_hash from the URL, the portal sets its cookie and the person lands on /es/onboarding with no extra click.
  3. Lifetime: 24 hours. An expired link (410) offers «Reenviar» (only with a ref) and «Salir»; 429 and 503 show a retry message.
Pending. T-107 (onboarding link login and resend) is still in progress, and T-137 will retire the horizon-authenticate onboarding magic-link screen once the 24-hour invitations issued before portal activation expire.

See also