Files
supabase/apps/docs/content/guides/platform/manage-your-usage/advanced-mfa-phone.mdx
Miranda Limonczenko 1d50816f47 docs: enforce duplicate ID a11y rules and fix duplicates (#52720)
Closes DOCS-1573

## Problem

Recently, @antlio surfaced that our side nav was visually breaking. This
is caused by a duplicate-id issue.

The docs E2E axe scan reports duplicate `id` attributes as a warning
only, so pages with duplicate IDs ship. A full scan of production guides
found duplicate IDs on 25 of 586 pages.

**Causes:**

- **Repeated headings:** a page uses the same heading text twice, for
example `#### Example` under two sections. Each heading slugs to the
same ID.
- **Pricing partials:** three usage pages put `## Pricing` directly
above a shared partial that starts with its own Pricing heading.
- **Components:** Mermaid diagrams hardcode SVG marker and node IDs. The
Apple secret generator renders `id="undefined-optional"` on each field
label. Each "Build it" listing on the Supabase way page renders
`#build-it`.

## Solution

- **Enforce the rules:** add `duplicate-id`, `duplicate-id-active`, and
`duplicate-id-aria` to `ENFORCED_RULES`.
- **Repeated headings:** give each later duplicate a
`[#parent-section-heading]` anchor. The first occurrence keeps its ID.
- **Pricing headings:** remove the page heading above the three partials
that start with `## Pricing`. The PITR partial starts with `###
Pricing`, so it gets `[#pitr-pricing]` and the page keeps its H2.
- **Mermaid:** prefix the SVG IDs of each diagram with `useId()`.
- **Apple secret generator:** give each field an ID. The label now also
points at its input.
- **Content listings:** add an optional `headingAnchor` to listing
groups, and set it on the repeated "Build it" groups.
- **pg_net:** the `http_delete` signature had `[#post-signature]`,
copied from `http_post`. It is now `[#delete-signature]`.

**Cross-references:** no link in the repo targets a changed ID. Each
first occurrence keeps its ID, so existing links resolve to the same
heading as before.

**Not changed:** the www suite and `packages/ui-patterns`. All fixes
stay in `apps/docs`.

**Verification:**

- Against production,
`/docs/guides/platform/manage-your-usage/log-drains` fails the @a11y
test with `duplicate-id`.
- Against a local docs server, the @a11y test passes on all 28 changed
or affected pages.

**Unverified:** a full-site run with `A11Y_ENFORCE_ALL=1`. Run it
against the preview before merge.

## Review instructions

1. From `e2e/docs`, run the a11y test against production. See it fail
with `duplicate-id`:

   ```bash
DOCS_E2E_PAGE_PATHS=/docs/guides/platform/manage-your-usage/log-drains
PLAYWRIGHT_BASE_URL=https://supabase.com pnpm exec playwright test
--grep @a11y
   ```

2. Run the same command with `PLAYWRIGHT_BASE_URL` set to the docs
preview URL from the Vercel bot comment. See it pass.
3. On the preview, open
`/docs/guides/platform/manage-your-usage/log-drains`. In the table of
contents, select **Pricing** under **Log Drain Events**. See the page
scroll to the second Pricing section.
4. On the preview, open
`/docs/guides/integrations/partner-integration-guide`. See both sequence
diagrams render with arrowheads.

## Checklist

Check all before review:

- [x] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [x] If I wrote a new docs topic or edited an existing topic, I used
the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs
[style
guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide)
2026-11-03 11:56:33 -08:00

94 lines
4.5 KiB
Plaintext

---
id: 'manage-usage-advanced-mfa-phone'
title: 'Manage Advanced MFA Phone usage'
---
## What you are charged for
You are charged for having the feature [Advanced Multi-Factor Authentication Phone](/docs/guides/auth/auth-mfa/phone) enabled for your project.
<Admonition type="note">
The Advanced MFA Phone add-on is **not** covered by the [Spend Cap](/docs/guides/platform/cost-control#spend-cap).
</Admonition>
<Admonition type="note">
Additional charges apply for each SMS or WhatsApp message sent, depending on your third-party messaging provider (such as Twilio or MessageBird).
</Admonition>
## How charges are calculated
MFA Phone is charged by the hour, meaning you are charged for the exact number of hours that the feature is enabled for a project. If the feature is enabled for part of an hour, you are still charged for the full hour.
### Example
Your billing cycle runs from January 1 to January 31. On January 10 at 4:30 PM, you enable the MFA Phone feature for your project. At the end of the billing cycle you are billed for 512 hours.
| Time Window | MFA Phone | Hours Billed | Description |
| ------------------------------------------- | --------- | ------------ | ------------------- |
| January 1, 00:00 AM - January 10, 4:00 PM | Disabled | 0 | |
| January 10, 04:00 PM - January 10, 4:30 PM | Disabled | 0 | |
| January 10, 04:30 PM - January 10, 5:00 PM | Enabled | 1 | full hour is billed |
| January 10, 05:00 PM - January 31, 23:59 PM | Enabled | 511 | |
### Usage on your invoice
Usage is shown as "Auth MFA Phone Hours" on your invoice.
<$Partial path="billing/pricing/pricing_mfa_phone.mdx" />
## Billing examples
### One project
The project has MFA Phone activated throughout the entire billing cycle.
| Line Item | Hours | Costs |
| ----------------------------- | ----- | ------------------------- |
| Pro Plan | - | <Price price="25" /> |
| Compute Hours Small Project 1 | 730 | <Price price="15" /> |
| MFA Phone Hours | 730 | <Price price="75" /> |
| **Subtotal** | | **<Price price="115" />** |
| Compute Credits | | -<Price price="10" /> |
| **Total** | | **<Price price="105" />** |
### Multiple projects
All projects have MFA Phone activated throughout the entire billing cycle.
| Line Item | Hours | Costs |
| ----------------------------- | ----- | ------------------------- |
| Pro Plan | - | <Price price="25" /> |
| | | |
| Compute Hours Small Project 1 | 730 | <Price price="15" /> |
| MFA Phone Hours Project 1 | 730 | <Price price="75" /> |
| | | |
| Compute Hours Small Project 2 | 730 | <Price price="15" /> |
| MFA Phone Hours Project 2 | 730 | <Price price="10" /> |
| | | |
| Compute Hours Small Project 3 | 730 | <Price price="15" /> |
| MFA Phone Hours Project 3 | 730 | <Price price="10" /> |
| | | |
| **Subtotal** | | **<Price price="165" />** |
| Compute Credits | | -<Price price="10" /> |
| **Total** | | **<Price price="155" />** |
### Add-on disabled after a day
Project add-ons are billed in arrears based on how many hours you used them.
If you remove the MFA Phone add-on, you are no longer billed from the time of removal onward.
| Line Item | Hours | Costs |
| ----------------------------- | ----- | --------------------------- |
| Pro Plan | - | <Price price="25" /> |
| | | |
| Compute Hours Small Project 1 | 730 | <Price price="15" /> |
| MFA Phone Hours Project 1 | 24 | <Price price="2.46" /> |
| | | |
| **Subtotal** | | **<Price price="42.46" />** |
| Compute Credits | | -<Price price="10" /> |
| **Total** | | **<Price price="32.46" />** |