Skip to main content
This page is for after the rollout. It covers the recurring tasks and what to do when something fails. The source of truth for every console is still the runbook docs/operations/oauth-providers.md.

Turn a provider on or off

Each provider has a single flag for every platform (ADR 0133), in the authenticate category: authenticate-oauth-google, authenticate-oauth-apple and authenticate-oauth-microsoft.
1

Open Capacidades

Horizon Enterprise of the environment → Capacidades → category authenticate.
2

Change the flag

Turn the provider’s flag on or off and leave a comment naming the reason and the runbook.
3

Wait for the next evaluate

The change takes effect at each client’s next evaluate, with no release. The app evaluates when it opens and when it returns to the foreground; the web evaluates on the server; horizon-api stops listing the provider in the providers of verify-email. If someone still sees the old state in the app, they should force-close it and open it again.
E-mail sign-in and the magic link keep working with any combination of flags. To see the current state:
If the backend is rolled back to a version older than 2026.11.3, do not run Sync in Capacidades: the old catalogue would delete the authenticate-oauth-* flags and recreate the old keys turned off.

Rotate the Apple secret every six months

Supabase’s Apple provider uses an ES256 JWT as its secret, valid for at most 6 months. When it expires, the browser flow (Android and web) fails; native iOS keeps working. horizon-api builds its own secret on every call from the .p8, so it needs no rotation while the key is valid.
1

Generate the JWT on a trusted machine

With Node and jose, never in CI. Use the environment’s Services ID:
15_552_000 seconds are 180 days.
2

Paste it in Supabase

Authentication → Sign In / Providers → Apple → Secret Key (for OAuth) → Save.
3

Record and schedule

Write the date in the runbook table (in a PR) and create a reminder five months later for Backend Platform: “Rotate the Supabase Apple secret, environment”.
Rotating the secret signs nobody out.

Rotate the keyrings

In both cases: change the value in the horizon-api 1Password Environment, run Sync Env and deploy (a Sync does not rebuild the app). Never reuse one keyring for the other.

Mandatory release

It is turned on only when 2026.11.3 is published in both stores. That way old versions, which do not read the new flags, get updated.
1

Turn it on

Horizon Enterprise → MaihueGO 2026.11.3 release → App Store row and Google Play row → mandatory. Through the API it is PATCH /api/v3/bbrands/application/release/store/<document_id> with is_mandatory: true.
2

Verify

With the previous version, both answers must carry update_required: true:
3

If the new version has a blocking bug

Turn is_mandatory off on both rows, pause the phased release in App Store Connect and the rollout in Play Console, and ship a fix.

How to roll back

Never delete Apple keys, Services IDs or relay registrations on rollback. Revoking a key breaks the browser flow, the code exchange and token revocation for that environment.

Troubleshooting

Where to look

  • Runbook: docs/operations/oauth-providers.md (consoles, variables, rollback).
  • horizon-api runtime logs in Vercel: search for rate_limit_blocked, oauth_query_tokens_used or Apple identity token refused.
  • Flags: Horizon Enterprise → Capacidades, or the evaluate route above.
  • E-mail: Resend → deliveries, to confirm whether a mail to the relay arrived or bounced.
  • Apple revocation: in the test Apple ID settings, MaihueGO no longer appears after the account is deleted.

Pending items

As of 2026-11-04 these authenticate/oauth tasks are still open:

See also