Skip to main content
This section explains, step by step, how a person creates their access, signs in and keeps their session in MaihueGO (iOS and Android) and in the web apps, and how all of it is operated in each environment. It is written for release 2026.11.3. The internal documentation, with requirements, decisions and status, lives in docs/initiatives/authenticate/ and the stable definition of the domain in docs/definitions/authentication.md.

What the domain covers

The authenticate domain (ADR 0131) groups everything related to getting into the platform: registration by e-mail or with a provider, sign-in with a password, a provider or a magic link, optional passwords, sessions and SSO between apps, linking logins to an account, the holding’s identity provider (IdP), machine authentication, auth events and security hardening. The identity engine today is Supabase Auth (GoTrue); horizon-api wraps it and issues its own internal JWT (Horizon JWT).
The MaihueGO app, horizon-authenticate, portal-customer and the other web apps call the auth endpoints and the identity provider of horizon-api. horizon-api reads flags and rate limits in Redis, signs in through Supabase Auth with Google, Apple and Microsoft, stores provider data in Postgres, talks to Apple ID for tokens, revocation and notifications, and sends auth e-mails through the notification core and Resend, behind Apple's Private Email Relay for hidden e-mails.

How authentication fits together

Key words

These words have a precise meaning across the whole domain. Use them this way in code, tickets and conversations with support.
The most common confusion is “login” versus “account”. One person can have one login with several identities (e-mail and Apple, for example) and that login can give access to several accounts.

The clients and what each one does

The pages of this section

E-mail-first sign-in

E-mail first on every surface: verify-email, the route table and password sign-in.

Registration

E-mail and provider registration, verification, required data and account migration.

Google, Apple and Microsoft

Per-platform behaviour, per-provider flags, contracts and limits.

Apple: tokens and notifications

Client secret, encrypted refresh token, revocation on account deletion and Apple notifications.

Magic link

The sign-in link for logins without a password and the portal activation link.

Password

Optional password: create, change, recover and the 4-of-5 rule.

Identity linking

A pending login that links to the account owning its document.

Session

Horizon JWT, sign-out, per-environment cookie and SSO handoff.

Platform

The holding’s IdP, machine authentication, auth events and the sign-in shell.

Security

Rate limits, lockout, environment switches and accepted risks.

Rollout

What to configure in each environment, in order, up to the mandatory release.

Operations and maintenance

Rotations, rollback and day-to-day diagnosis.

What changes in 2026.11.3

Everything ships in a single PR (#1960, label large-change):
  1. Sign in with Apple comes back, after the App Review rejection under guideline 4.8: native on iOS and through the browser with a Services ID on Android and the web (ADR 0135).
  2. Provider registration asks for no password (ADR 0132). The password is optional and offered later: Home alert and Settings in the app, banner and Mi cuenta › Seguridad in the portal.
  3. One flag per provider for every platform: authenticate-oauth-google, authenticate-oauth-apple and authenticate-oauth-microsoft, category authenticate, off by default (ADR 0133, supersedes ADR 0048). The old maihuego-application-oauth-* keys are deleted.
  4. Sign-in starts with the e-mail everywhere: POST /api/v3/auth/verify-email returns providers and has_created_password (ADR 0134).
  5. Sign-in magic link for logins without a password: one hour, single use, resend after 60 seconds. “Forgot password” without a password sends it too.
  6. Apple token lifecycle: refresh token stored encrypted, revoked on account deletion, and an endpoint for Apple’s server-to-server notifications.
  7. Pending login linking: a provider sign-in blocked by a document conflict links, with a code, to the account that owns the document (ADR 0136).
  8. Every login records user_metadata.provider and user_metadata.is_private_email.
  9. Production launch values: Google on, Apple on, Microsoft off. The release becomes mandatory once it is published in both stores.
  10. The documentation is consolidated: categories auth, idp, oauth and horizon-authenticate become category authenticate, with 13 initiatives (ADR 0131).
Pending. As of 2026-11-04 every 2026.11.3 task was merged in PR #1960, not merged. The manual test table MT-01 to MT-11 is pending, and turning the flags on in production, the App Review submission and the mandatory release (T-15 to T-17) are still to do.

Status per capability

Progress percentages from each initiative’s tracker.yml as of 2026-11-04. When the last audit is older, its date is shown.
There is no second factor today: the authenticate-two-factor-ui flag is off in every environment and the 2FA backend does not exist. When this documentation says “the 2FA gate”, that step does nothing yet.

See also