Commit Graph

35 Commits

Author SHA1 Message Date
Chris Stockton c8d60097d9 fix(docs): before-user-created hook had invalid ipnet cmp (#47940)
The comparison operator `<<` check if lhs is strictly contained by the
rhs. Meaning a `/32` would return false for `/32` as the lhs is not
contained, but equal to the rhs. The `<<=` is operator checks if a
subnet is strictly contained or equal to which fixes the `/32` case.

[1] https://www.postgresql.org/docs/17/functions-net.html#FUNCTIONS-NET


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Documentation**
* Updated the `before-user-created` hook SQL example to use the correct
IP/CIDR containment syntax for both allow and deny network checks.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: Chris Stockton <chris.stockton@supabase.io>
2026-07-14 19:27:26 +00:00
Miranda Limonczenko 3dffdefd6e fix(docs) Resolve 196 mdx lint warnings for just, quickly, actually, PostgreSQL (#47358)
Closes DOCS-1057
Contributes to DOCS-1052

## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

## Problem

We have hundreds of MDX lint warnings in our docs going against style
best practices.

## Solution

Remove and replace in context the following:

- PostgreSQL. There was only one. There was concern about exceptions,
but I found none.
- Just
- Quickly
- Actually

### What changed

Edits follow the [Google developer documentation style
guide](https://developers.google.com/style): concise, direct, active
voice. The flagged words were removed when the sentence still read well,
or replaced when meaning needed to be preserved.

### Common patterns

| Flagged word | Approach | Example |
|---|---|---|
| **just** (filler) | Removed | "you just installed" → "you installed" |
| **just** (limiting) | **only** | "just one row" → "only one row" |
| **just like** | **like** / **the same as** | "function just like
regular users" → "function like regular users" |
| **not just** | **not only** | "not just errors" → "not only errors" |
| **quickly** (performance) | **efficiently** or removed | "find rows
quickly" → "find rows efficiently" |
| **quickly** (time) | **soon** / **rapidly** / removed | "expires too
quickly" → "expires too soon" |
| **actually** (filler) | Removed | "actually execute" → "execute"; "is
actually the most common" → "is the most common" |

## Tophatting

1. See the diff.
2. See that content continues to make sense in context.
3. Locally, `cd apps/docs` and run `pnpm run lint:mdx`.
4. Search for "just," "actually," "quickly", and "PostgreSQL" and see
there are 0 warnings.




<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Documentation**
* Updated wording across quickstarts, guides, and troubleshooting
articles for grammar, clarity, and consistent step-by-step phrasing.
* Clarified key concepts including Row Level Security policy evaluation
across Supabase products, deferred foreign key constraint behavior, and
when `EXPLAIN ANALYZE` executes queries (and related side effects).
* Refined several troubleshooting instructions and added guidance to cap
log payload size to reduce billed Logs Ingest volume.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Nik Richers <nrichers@gmail.com>
Co-authored-by: Chris Chinchilla <chris.ward@supabase.io>
2026-06-29 09:40:25 -07:00
Kimaswa Emmanuel Yusufu 64085b2d0c docs: fix broken code examples and wrong identifiers in guides (#46755)
A handful of code samples in the guides either don't run or contradict
the surrounding text. I found these reading through the docs.

- `database/debugging-performance`: `insert into books` targets a table
that's never created. The table made just above is `instruments`.
- `database/drizzle`: the `db.ts` snippet references an undefined
`host`. The variable in scope is `connectionString`.
- `database/postgres/column-level-security`: the `create table` is
missing a comma after `created_at ... now()`, so it won't parse.
- `database/postgres/first-row-in-group`: `distinct on (team)` with
`order by id, ...` is rejected by Postgres (the DISTINCT ON column has
to lead the ORDER BY). Ordered by `team, points desc` so it returns one
row per team.
- `database/postgres/data-deletion`: reversed markdown link
`(text)[url]`, plus "parititioning" misspelled.
- `database/extensions/pg_plan_filter`: prose says
`statement_cost_filter`, but the real parameter (used everywhere else in
the file) is `statement_cost_limit`.
- `auth/auth-hooks/mfa-verification-hook`: the insert and on-conflict
update use `last_refreshed_at`, but the table column is
`last_failed_at`.
- `telemetry/advanced-log-filtering`: the "ends with" example writes
`'$port=12345'`. The `$` anchor needs to come after the literal:
`'port=12345$'`.
- `ai/examples/headless-vector-search`: uses `${projectURL}` but the
const is `projectUrl`.
- `getting-started/quickstarts/redwoodjs`: prose says
`scripts/seeds.ts`, but the code block and Redwood use
`scripts/seed.ts`.
- `getting-started/tutorials/with-flutter`: two code-fence headers have
a stray trailing `"`.
- `local-development/cli/testing-and-linting`: stray backtick in "Edge`
Functions".


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Documentation**
* Corrected code examples across multiple guides including vector
search, authentication hooks, database guides, and quickstarts
* Fixed SQL syntax errors, variable names, and table references in
example snippets
* Resolved typos, broken links, and formatting inconsistencies in guide
text
  * Clarified parameter names and script references in documentation
  * Updated code fence syntax in tutorials for proper rendering

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: Chris Chinchilla <chris.ward@supabase.io>
2026-06-12 16:08:41 +00:00
Danny White 38e09e1754 chore(studio + docs + ui library): update auth email template copy docs (#45706)
## What kind of change does this PR introduce?

Docs update. Part of DEPR-198.

## What is the current behaviour?

Auth email template examples and Studio template labels still reflect
older default copy in a few places.

## What is the new behaviour?

Updates Auth docs, local development docs, related snippets, Studio
template labels, and UI Library examples to [match the updated default
Auth email
copy](https://linear.app/supabase/document/email-template-copywriting-updates-04bba460fd2a).


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Documentation**
* Updated authentication email template names and descriptions across
guides, replacing "Magic link" with "Sign-in link or code" terminology
* Revised security notification email naming from "Identity
linked/unlinked" to "Sign-in method linked/removed" and "MFA method" to
"Verification method"
* Updated email template example content with improved wording (e.g.,
"Confirm your email address" instead of "Confirm your signup")

* **UI Updates**
* Refined authentication-related UI text labels and descriptions in the
dashboard

[![Review Change
Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/supabase/supabase/pull/45706)
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2026-05-22 11:47:36 +10:00
Danny White f45a6085f4 feat(studio): add auth email template reset flow (#45572)
## What kind of change does this PR introduce?

Feature. Resolves AUTH-879.

## What is the current behavior?

Studio does not provide a way to reset an Auth email template back to
the default subject and body once it has been customised.

## What is the new behavior?

Studio shows a `Reset template` action when Platform reports that the
selected Auth email template subject or body has been customised. The
action opens a confirmation dialog, calls the dedicated Platform reset
endpoint, and refreshes the editor with the default subject and body
returned by the API.

The Auth config save/reset mutations now run their user-facing success
handling before refreshing Auth lint data, so the success toast and
local editor cleanup are not delayed by lint refetches.

## Additional context

Depends on supabase/platform#32417.



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Reset email templates to defaults via a confirmation dialog; button
appears when custom content is detected and respects update permissions.
* Typed email-template definitions and improved template variable
display and descriptions.

* **Tests**
* Added tests covering template reset visibility, confirmation flow,
state updates, permission handling, and toast notifications.

* **Documentation**
* Example email template placeholders updated for internationalization
and provider snippets.

<!-- review_stack_entry_start -->

[![Review Change
Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/supabase/supabase/pull/45572)

<!-- review_stack_entry_end -->
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2026-05-18 14:33:26 +10:00
Chris Chinchilla eddaded58d docs: Auth hooks Keys changes (#45168) 2026-04-23 22:02:06 +01:00
Taryn King 65c6929414 chore(docs): update docs to use postgres over postgresql language (#44881)
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

## What kind of change does this PR introduce?

Updates verbiage throughout docs to use postgres over postgresql.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Documentation**
* Updated terminology throughout documentation, guides, and resources
for consistent product naming across all user-facing materials,
including page titles, descriptions, and reference documentation.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-04-15 09:49:45 +00:00
Vaibhav 83864997bd docs: add cli global install note and correct user.new_email (#43151)
## Problem

1. Users attempting to install the Supabase CLI globally via `npm
install -g supabase`
2. The Send Email Hook documentation incorrectly references
`user.email_new` instead of the correct field name `user.new_email`

## Solution

1. Added a clear note in the CLI getting started guide warning users
that npm global installation is not supported, directing them to use the
recommended installation methods instead
2. Corrected all three instances of `user.email_new` to `user.new_email`
in the Send Email Hook documentation to match the actual User interface
definition from `@supabase/auth-js`
 

## Related 
- closes #43157
- closes https://github.com/supabase/cli/issues/4496
2026-03-20 11:59:04 +01:00
Yogeshwaran C 647ac43c0a fix: correct indefinite article usage for acronyms (an HTTP, an API, an RLS) (#42919)
## What kind of change does this PR introduce?

Grammar corrections across documentation and test descriptions.

## What is the current behavior?

Multiple docs and test files use "a" before acronyms that start with a
vowel sound when pronounced:
- "a HTTP" (pronounced "aitch-tee-tee-pee") should be "an HTTP"
- "a API" (pronounced "ay-pee-eye") should be "an API"  
- "a RLS" (pronounced "arr-ell-ess") should be "an RLS"
- "the all users" is redundant (should be "all users")

## What is the new behavior?

All instances corrected to use proper English indefinite articles:

### Docs files (11 files):
- `firebase-auth.mdx` — "the all users" -> "all users" (2 occurrences)
- `log-drains.mdx` — "a HTTP drain" -> "an HTTP drain"
- `securing-your-api.mdx` — "a HTTP 402" and "a HTTP 420" -> "an HTTP"
- `scan-error-*.mdx` — "a HTTP 500" -> "an HTTP 500"
- `roboflow.mdx` — "a HTTP interface" -> "an HTTP interface"
- `auth-hooks.mdx` — "A HTTP Hook" -> "An HTTP Hook", "a HTTP hook" ->
"an HTTP hook", "a HTTP error" -> "an HTTP error"
- `auth-mfa.mdx` — "a HTTP 401" -> "an HTTP 401"
- `password-verification-hook.mdx` — "a HTTP request" -> "an HTTP
request"
- `before-user-created-hook.mdx` — "a HTTP implementation" -> "an HTTP
implementation"
- `pgtap-extended.mdx` — "a API exposed schema" -> "an API exposed
schema"
- `error-codes.mdx` — "a RLS policy" -> "an RLS policy"
- `broadcast.mdx` — "a RLS" -> "an RLS"

### Studio files (1 file):
- `CronJobs.utils.test.ts` — "a HTTP request" -> "an HTTP request" (9
test descriptions) + "notationa" typo -> "notation"

## Additional context

The rule: use "an" before acronyms pronounced with a leading vowel
sound. "HTTP" starts with "aitch" (vowel sound), "API" starts with "ay"
(vowel sound), and "RLS" starts with "arr" (vowel sound).
2026-02-19 07:23:18 -07:00
Chris Stockton a1b3f3b7e7 chore(docs/auth): clarification for email & sms hooks (#40692)
Co-authored-by: Chris Stockton <chris.stockton@supabase.io>
2025-12-09 08:07:46 +01:00
Cemal Kılıç 93eb6a1c9d feat(docs): add supabase auth oauth2.1 docs (#40340)
* feat(docs): add supabase auth oauth2.1 docs

* fix: fix spelling & heading

* fix: format

* Update linter

* Change inline HTML

* Update apps/docs/content/guides/auth/oauth-server/oauth-flows.mdx

* Update apps/docs/content/guides/auth/oauth-server/oauth-flows.mdx

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update spelling

* fix: rm detailed MCP intro

* fix: auth server discovery url

* feat: simpler mcp auth docs

* feat: add scope related docs

* fix: lint

* fix: format

* feat: tabbed view for dashboard/cli

* fix: lint

* chore: update wording

---------

Co-authored-by: Chris Chinchilla <chris.ward@supabase.io>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Chris Chinchilla <chris@chrischinchilla.com>
2025-11-26 18:35:48 +07:00
issuedat f10f76e7e4 feat(docs): add account changes notifications email customization (#40141)
* feat(docs): add account changes notifications email customization

* chore: update CLI config

* chore: update CLI docs and template descriptions

* customizing-email-template copywriting

* send-email-hook copywriting

* auth-email-templates edits

* fix error

* chore: cleanup example `email_data`

* Undo formatting

* Prettier

* copy improvements

---------

Co-authored-by: Danny White <3104761+dnywh@users.noreply.github.com>
Co-authored-by: Chris Chinchilla <chris.ward@supabase.io>
2025-11-11 12:59:07 +01:00
Charis 47705a8968 chore: replace all supabase urls with relative urls (#38537)
* fix: rewrite relative URLs when syncing to GitHub discussion

Relative URLs back to supabse.com won't work in GitHub discussions, so
rewrite them back to absolute URLs starting with https://supabase.com

* fix: replace all supabase urls with relative urls

* chore: add linting for relative urls

* chore: bump linter version

* Prettier

---------

Co-authored-by: Chris Chinchilla <chris.ward@supabase.io>
2025-09-09 12:54:33 +00:00
Chris Stockton 97a447ac5c docs(auth-hooks): clarify webhook status codes and document email_change quirk (#38141)
* docs(auth-hooks): clarify webhook status codes and document email_change quirk

- Clarify hook response handling:
  - Note that some hooks do not support 204 responses if they require a body
  - Update retry-able error behavior for 429/503 with explicit 5s budget
  - Add note that Retry-After header is only checked for non-empty value, not parsed

- Expand send-email-hook docs:
  - Add detailed section on `email_change` behavior
  - Explain secure vs non-secure modes and when two emails must be sent
  - Document long-standing quirk where `token_hash` and `token_hash_new`
    are swapped relative to expected naming
  - Extend enum to include `reauthentication`
  - Improve confirmation URL example using URLSearchParams and projectRef

* fix: fix linter error

* fix: pr feedback

* fix: pnpm format

* fix: pr feedback

---------

Co-authored-by: Chris Stockton <chris.stockton@supabase.io>
2025-08-26 08:41:13 -07:00
Micael Dias 95a4d9b698 fix(docs): magic_link is not a valid action type (#37129) 2025-07-14 21:05:03 +00:00
github-actions[bot] d3ffbe0999 [bot] fix lint errors (#36872)
* [bot] fix lint errors

* Update apps/docs/content/guides/auth/auth-hooks/before-user-created-hook.mdx

---------

Co-authored-by: github-docs-bot <github-docs-bot@supabase.com>
Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>
2025-07-04 15:18:16 +00:00
Chris Stockton 8a4bca34a7 feat: add documentation and UI integration for Before User Created hook (#36567)
* feat: add documentation and UI integration for Before User Created hook

- Added new guide: `before-user-created-hook.mdx`, documenting usage, inputs,
  outputs, and multiple complete examples for HTTP and SQL.
- Updated navigation menu and hook index table to include the new hook.
- Hook is now listed as available on Free and Pro plans.

Studio changes:
- Registered `Before User Created` hook in `hooks.constants.ts` with proper
  title, slug, and configuration keys.
- Enabled Docs button linking to hook guide in both `CreateHookSheet` and `HookCard` components.
- Extended hook listing page to support docs access via `secondaryActions`.

This hook allows developers to intercept and reject user creation across all
flows (email/password, OAuth, SSO, SAML, anonymous) - enabling custom signup
logic like domain allowlists, geofencing, or account gating.

* fix: add subnet to mdx lint allowed list

* fix: incorporate feedback and spelling changes

* feat: add allow/deny domain and CIDR examples to before-user-created hook

This commit enhances the documentation for the before-user-created auth hook:
- Adds production-ready SQL examples for blocking or allowing signups by email domain (signup_email_domains) and IP address or CIDR (signup_networks)
- Introduces enum-based classification (allow vs deny) for both domain and network restrictions
- Adds full migration-style snippets for easy copy/paste into Supabase SQL Editor
- Includes updated HTTP examples that delegate to Postgres functions via Supabase client rpc()
- Adds environment setup guidance and edge function scaffolding

* fix: pnpm format

---------

Co-authored-by: Chris Stockton <chris.stockton@supabase.io>
2025-07-02 14:54:07 -07:00
Cemal Kılıç f6b316e1cf chore(docs): update required claims for access token (#36021)
docs: update required claims for access token
2025-05-29 15:35:15 +02:00
Charis 6fcb98d927 docs(pg17): add docs on pg17 upgrades (#35431) 2025-05-22 14:07:06 -04:00
Andrew Smith 6806ff5755 fix(docs): update callback url to use token_hash instead of token (#35643) 2025-05-13 14:07:49 +00:00
Abu Huraira 7b7fd28947 fix(docs): replace {} with JSON.stringify({}) in custom send-sms edge function (#33794)
fix(docs): replace {} with JSON.stringify({})
2025-02-24 15:36:30 +00:00
Florian Lefebvre 508420a9c4 docs(auth): improve auth hooks (#28936) 2025-02-19 06:00:27 +00:00
Charis 2d55512553 chore: activate spelling and admonitions lints for docs (#33292) 2025-02-04 13:18:31 -05:00
Stojan Dimitrovski cfb18eb272 docs: add minimal jwt example with custom access token hook (#32770) 2025-01-16 10:53:02 +01:00
Chris Stockton 5af1abd28c feat: update emails to use a valid email address (#30978)
The purpose of this change is to reduce the bounce back rate of
the default email provider at Supabase. This change will allow
users to continue copying examples from the docs. Without it, an
upcoming change in supabase/auth[1] will begin rejecting these
invalid emails.

[1] https://github.com/supabase/auth/pull/1845

Co-authored-by: Chris Stockton <chris.stockton@supabase.io>
2024-12-09 15:43:35 -07:00
Charis 572111224b ci(docs): bump linter + expand linting to auth section (#30704) 2024-11-28 10:26:00 -05:00
Joel Lee df1bfb9017 fix: describe Auth Hook interaction with email provider (#30159)
* fix: include table with email settings

* fix: update terminology to Enabled/Disabled
2024-10-29 17:09:29 +08:00
Joel Lee c9a5c6005d fix: add confirmation url for Send Email Auth Hook (#28821)
fix: add confirmation url generation
2024-10-29 14:45:20 +08:00
Wen Bo Xie fb2f7e2d43 fix: fully qualify table in send email auth hook (#29906) 2024-10-16 09:54:30 +02:00
Joel Lee b6f1e1bd78 fix: change to return jsonb (#29887) 2024-10-14 18:18:11 -04:00
Thor 雷神 Schaeff 2ae41b620e Add Auth Hook Resend Example. (#28805) 2024-08-23 21:31:35 +08:00
Thor 雷神 Schaeff fc5a5c8303 Update send-email-hook.mdx (#28785) 2024-08-22 23:17:45 +08:00
Kang Ming ccb4820cf7 fix: add resend example to send email hook (#28613) 2024-08-20 22:31:49 -04:00
Kang Ming d18bef8b9c docs: update postgres hooks security model (#28681)
* fix: update security model for postgres hooks

* chore: remove grants from postgres hook examples
2024-08-15 16:13:14 -04:00
Joel Lee a8f6b74dd3 docs: add http auth hook docs (#25880)
* feat: add http auth hook docs

* fix: add more notes

* fix: add send sms and send email stubs

* fix: add jsonschemas

* fix: add jsonschema for tab

* fix: restructure docs

* feat: add more http examples

* fix: add more examples

* feat: add sql hooks

* fix: patch vale errors

* fix: remove more uses of we

* fix: correct label

* fix: apply suggestions

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>

* fix: move to shared config

* fix: update mfa and password examples

* fix: add line about jsonschema

* fix: remove HTTP examples for MFA Verification and Password Verification

* chore: update hook secret description

* chore: cleanup overview and add subtitle

* chore: reorganize examples into tabs

* chore: reorganize sections

* chore: format input / outputs into tables

* chore: move each hook into separate pages

* chore: cleanup content

* chore: fix more formatting

* chore: add hooks to sidenav

---------

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>
Co-authored-by: Kang Ming <kang.ming1996@gmail.com>
2024-08-12 18:29:27 -07:00