Files
supabase/apps/docs/content/guides/platform/manage-your-usage/monthly-active-users-sso.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

146 lines
4.7 KiB
Plaintext

---
id: 'manage-usage-monthly-active-users-sso'
title: 'Manage Monthly Active SSO Users usage'
---
## What you are charged for
You are charged for the number of distinct users who sign in or refresh their token during the billing cycle using a SAML 2.0 compatible identity provider (e.g. Google Workspace, Microsoft Active Directory). Each unique user is counted only once per billing cycle, regardless of how many times they authenticate. These users are referred to as "SSO MAUs".
### Example
Your billing cycle runs from January 1 to January 31. Although User-1 was signed in multiple times, they are counted as a single SSO MAU for this billing cycle.
<StepHikeCompact>
<StepHikeCompact.Step step={1}>
<StepHikeCompact.Details title="Sign User-1 in on January 3" fullWidth>
The SSO MAU count increases from 0 to 1.
```javascript
const { data, error } = await supabase.auth.signInWithSSO({
domain: 'company.com'
})
if (data?.url) {
// redirect User-1 to the identity provider's authentication flow
window.location.href = data.url
}
```
</StepHikeCompact.Details>
</StepHikeCompact.Step>
{' '}
<StepHikeCompact.Step step={2}>
<StepHikeCompact.Details title="Sign User-1 out on January 4" fullWidth>
```javascript
const { error } = await supabase.auth.signOut()
```
</StepHikeCompact.Details>
</StepHikeCompact.Step>
<StepHikeCompact.Step step={3}>
<StepHikeCompact.Details title="Sign User-1 in again on January 17" fullWidth>
The SSO MAU count remains 1.
```javascript
const { data, error } = await supabase.auth.signInWithSSO({
domain: 'company.com'
})
if (data?.url) {
// redirect User-1 to the identity provider's authentication flow
window.location.href = data.url
}
```
</StepHikeCompact.Details>
</StepHikeCompact.Step>
</StepHikeCompact>
## How charges are calculated
You are charged by SSO MAU.
### Usage on your invoice
Usage is shown as "Monthly Active SSO Users" on your invoice.
<$Partial path="billing/pricing/pricing_mau_sso.mdx" />
<Admonition type="note">
The count resets at the start of each billing cycle.
</Admonition>
| Plan | Quota | Over-Usage |
| ---------- | ------ | ----------------------------------- |
| Pro | 50 | <Price price="0.015" /> per SSO MAU |
| Team | 50 | <Price price="0.015" /> per SSO MAU |
| Enterprise | Custom | Custom |
## Billing examples
### Within quota
The organization's SSO MAU usage for the billing cycle is within the quota, so no charges apply.
| Line Item | Units | Costs |
| ------------------------ | ---------- | ------------------------ |
| Pro Plan | 1 | <Price price="25" /> |
| Compute Hours Small | 730 hours | <Price price="15" /> |
| Monthly Active SSO Users | 37 SSO MAU | <Price price="0" /> |
| **Subtotal** | | **<Price price="40" />** |
| Compute Credits | | -<Price price="10" /> |
| **Total** | | **<Price price="30" />** |
### Exceeding quota
The organization's SSO MAU usage for the billing cycle exceeds the quota by 10, incurring charges for this additional usage.
| Line Item | Units | Costs |
| ------------------------ | ---------- | --------------------------- |
| Pro Plan | 1 | <Price price="25" /> |
| Compute Hours Small | 730 hours | <Price price="15" /> |
| Monthly Active SSO Users | 60 SSO MAU | <Price price="0.15" /> |
| **Subtotal** | | **<Price price="40.15" />** |
| Compute Credits | | -<Price price="10" /> |
| **Total** | | **<Price price="30.15" />** |
## View usage
You can view Monthly Active SSO Users usage on the [organization's usage page](/dashboard/org/_/usage). The page shows the usage of all projects by default. To view the usage for a specific project, select it from the dropdown. You can also select a different time period.
<Image
alt="Usage page navigation bar"
src={{
light: '/docs/img/guides/platform/usage-navbar--light.png',
dark: '/docs/img/guides/platform/usage-navbar--dark.png',
}}
width={1546}
height={208}
/>
In the Monthly Active SSO Users section, you can see the usage for the selected time period.
<Image
alt="Usage page Monthly Active SSO Users section"
src={{
light: '/docs/img/guides/platform/usage-mau-sso--light.png',
dark: '/docs/img/guides/platform/usage-mau-sso--dark.png',
}}
width={2034}
height={884}
/>
## Exceeding Quotas
<$Partial path="billing/exceeding_usage_quotas.mdx" />