account_user: someone signed in with a provider and has
not finished registration yet. If during registration they declare a RUT or document that already
belongs to another account, they used to be stuck. From 2026.11.3 they can link to that account by
proving it is theirs (ADR 0136). It is not a merge: the existing account stays as it is and gains one
more login.
The typical case is Apple with «Hide My Email»: the @privaterelay.appleid.com address almost never
matches the account’s e-mail, so the RUT is the key that finds it.
Linking a provider login to an existing account by RUT
Status. Initiative
authenticate/identity-linking is in build. The endpoints, the columns and the
MaihueGO screen ship in PR #1960 (merged into develop on 2026-11-05) with 2026.11.3, with no flag. The exit
check is MT-04 with Google, Apple and Microsoft on iOS and Android.Step by step in MaihueGO
1
Document conflict
Registration answers
409 with metadata.reason = DOCUMENT_ALREADY_REGISTERED and the owner’s
masked e-mail. The app shows the conflict screen (auth.document-conflict), which keeps that
masked e-mail visible.2
«Es mi cuenta, vincular»
This is the primary action. The app calls
POST /api/v3/auth/oauth/link/start with the pending
login’s GoTrue tokens and the declared document.3
Code to the masked e-mail
The code screen, reused from the account merge (
/account/merge), reads «Te enviamos un código a»
followed by the owner’s masked e-mail. The e-mail is the event auth.login-link.code-requested.4
Confirm
POST /api/v3/auth/oauth/link/confirm with the code. When it is right the answer is
{ linked: true }.5
Enter the account
The app finishes the provider sign-in with
oauth/complete, now inside the linked account, and
opens its Home.«No tengo acceso a ese correo»
The secondary exit of the code screen opens identity verification. Its result (identity_attestation)
only counts as proof when the owner account has no e-mail, as in the assisted merge. If the account
has an e-mail, the code is the only valid proof.
Exception to D-111. In the assisted account merge (account-centric identity, D-111) the screen does
not reveal the owner’s e-mail. Here it shows it masked, by decision of ADR 0136, so the person
recognises their account.
E-mail and password registration
The same link works for an e-mail registration (account-centric identity D-175): the person confirmed their e-mail with the registration code and is signed in, but has no account yet when the RUT turns out to be taken. «Es mi cuenta, vincular» then calls the same routes with the session JWT inAuthorization and no GoTrue tokens. After the code, the app re-signs with auth/profile/me and opens
Home of the existing account; the new e-mail keeps its password as one more login of that account.
A registration that asks for the RUT before the e-mail exists has no login to link, so its conflict
screen offers only «Usar otro documento» and «Iniciar sesión con otro correo», and its text promises
nothing else.
Contracts
- Authentication: the pending login’s GoTrue tokens, or, for the e-mail registration, its session JWT
in
Authorizationwith neither token in the body. Half a pair answers400. 403 login-not-pending: the login already has a non-deletedaccount_user(active or not), or it came with GoTrue tokens and holds no provider identity.403 email-not-confirmed: a session login whose e-mail is not confirmed.400 invalid-code: wrong or expired code, refused attestation or a document without an account. Each attempt spends budget.429: budget exhausted; the screen asks to wait.- Sending the code uses the assisted merge’s 60-second resend window per account. When it cannot be
sent (window taken, account without e-mail), the answer is still
{ sent: true }and the reason goes to the logs.
Budget
What linking writes
provider and is_private_email per login
Every login records how it was created and whether its e-mail is private. They are written by e-mail
registration and by oauth/register.
The migration is additive only and there is no backfill: logins created before 2026.11.3 keep an empty
provider and is_private_email = false.
Support badge
Pending. Showing the provider and a private e-mail badge on a customer’s logins in Horizon
Enterprise is T-04 (p2, todo). Until then the data exists in
user_metadata but is not visible in
the support interface.