From 4a57a9575524cb2d8e333841c98f1f2581b041c3 Mon Sep 17 00:00:00 2001 From: "Peter Chen J." <34339487+peter941221@users.noreply.github.com> Date: Thu, 18 Jun 2026 20:09:29 +0800 Subject: [PATCH] docs: update stale auth hook links (#46948) This updates the remaining stale auth hook references after the auth hooks guide moved from hash anchors to dedicated subpages. It switches the RBAC guide to the current custom access token hook page, updates the MFA verification hook reference in both the docs error-code source and the shared-data export, and fixes the matching custom access token hook comments in the Slack Clone SQL examples. Testing: not run. Link-target updates only. Refs #46947 ## Summary by CodeRabbit ## Release Notes * **Documentation** * Updated error code and auth hook documentation reference links to point to more specific canonical documentation pages, improving accuracy of references for developers. --- apps/docs/content/errorCodes/authErrorCodes.toml | 2 +- .../api/custom-claims-and-role-based-access-control-rbac.mdx | 4 ++-- .../slack-clone/nextjs-slack-clone-dotenvx/full-schema.sql | 3 +-- .../supabase/migrations/20240214114147_auth-hook.sql | 2 +- examples/slack-clone/nextjs-slack-clone/full-schema.sql | 3 +-- .../supabase/migrations/20240214114147_auth-hook.sql | 2 +- packages/shared-data/error-codes.ts | 2 +- 7 files changed, 8 insertions(+), 10 deletions(-) diff --git a/apps/docs/content/errorCodes/authErrorCodes.toml b/apps/docs/content/errorCodes/authErrorCodes.toml index 8d33253b3e0..12505f7a8ac 100644 --- a/apps/docs/content/errorCodes/authErrorCodes.toml +++ b/apps/docs/content/errorCodes/authErrorCodes.toml @@ -126,7 +126,7 @@ description = "MFA challenge could not be verified -- wrong TOTP code." [mfa_verification_rejected] description = "Further MFA verification is rejected. Only returned if the MFA verification attempt hook returns a reject decision." [[mfa_verification_rejected.references]] -href = "https://supabase.com/docs/guides/auth/auth-hooks?language=add-admin-role#hook-mfa-verification-attempt" +href = "https://supabase.com/docs/guides/auth/auth-hooks/mfa-verification-hook" description = "MFA verification hook" [mfa_verified_factor_exists] diff --git a/apps/docs/content/guides/api/custom-claims-and-role-based-access-control-rbac.mdx b/apps/docs/content/guides/api/custom-claims-and-role-based-access-control-rbac.mdx index 7625cacfe7e..cea9bc51167 100644 --- a/apps/docs/content/guides/api/custom-claims-and-role-based-access-control-rbac.mdx +++ b/apps/docs/content/guides/api/custom-claims-and-role-based-access-control-rbac.mdx @@ -18,7 +18,7 @@ Custom Claims are special attributes attached to a user that you can use to cont } ``` -To implement Role-Based Access Control (RBAC) with `custom claims`, use a [Custom Access Token Auth Hook](/docs/guides/auth/auth-hooks#hook-custom-access-token). This hook runs before a token is issued. You can use it to add additional claims to the user's JWT. +To implement Role-Based Access Control (RBAC) with `custom claims`, use a [Custom Access Token Auth Hook](/docs/guides/auth/auth-hooks/custom-access-token-hook). This hook runs before a token is issued. You can use it to add additional claims to the user's JWT. This guide uses the [Slack Clone example](https://github.com/supabase/supabase/tree/master/examples/slack-clone/nextjs-slack-clone) to demonstrate how to add a `user_role` claim and use it in your [Row Level Security (RLS) policies](/docs/guides/database/postgres/row-level-security). @@ -71,7 +71,7 @@ values ## Create Auth Hook to apply user role -The [Custom Access Token Auth Hook](/docs/guides/auth/auth-hooks#hook-custom-access-token) runs before a token is issued. You can use it to edit the JWT. +The [Custom Access Token Auth Hook](/docs/guides/auth/auth-hooks/custom-access-token-hook) runs before a token is issued. You can use it to edit the JWT.