The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
docs: update stale auth hook links (#46948)
Peter Chen J.4a57a9575524
diff --git a/apps/docs/content/errorCodes/authErrorCodes.toml b/apps/docs/content/errorCodes/authErrorCodes.tomlindex 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.mdxindex 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.<Tabsscrollablediff --git a/examples/slack-clone/nextjs-slack-clone-dotenvx/full-schema.sql b/examples/slack-clone/nextjs-slack-clone-dotenvx/full-schema.sqlindex a3e294961cb..c9428b736b1 100644--- a/examples/slack-clone/nextjs-slack-clone-dotenvx/full-schema.sql+++ b/examples/slack-clone/nextjs-slack-clone-dotenvx/full-schema.sql@@ -145,7 +145,7 @@ alter publication supabase_realtime add table public.users;*/-- Create the auth hook function--- https://supabase.com/docs/guides/auth/auth-hooks#hook-custom-access-token+-- https://supabase.com/docs/guides/auth/auth-hooks/custom-access-token-hookcreate or replace function public.custom_access_token_hook(event jsonb)returns jsonblanguage plpgsql@@ -221,4 +221,3 @@ beginreturn user_id;end;$$ language plpgsql;-diff --git a/examples/slack-clone/nextjs-slack-clone-dotenvx/supabase/migrations/20240214114147_auth-hook.sql b/examples/slack-clone/nextjs-slack-clone-dotenvx/supabase/migrations/20240214114147_auth-hook.sqlindex 5b3be2ae946..4ee152b3517 100644--- a/examples/slack-clone/nextjs-slack-clone-dotenvx/supabase/migrations/20240214114147_auth-hook.sql+++ b/examples/slack-clone/nextjs-slack-clone-dotenvx/supabase/migrations/20240214114147_auth-hook.sql@@ -4,7 +4,7 @@*/-- Create the auth hook function--- https://supabase.com/docs/guides/auth/auth-hooks#hook-custom-access-token+-- https://supabase.com/docs/guides/auth/auth-hooks/custom-access-token-hookcreate or replace function public.custom_access_token_hook(event jsonb)returns jsonblanguage plpgsqldiff --git a/examples/slack-clone/nextjs-slack-clone/full-schema.sql b/examples/slack-clone/nextjs-slack-clone/full-schema.sqlindex a3e294961cb..c9428b736b1 100644--- a/examples/slack-clone/nextjs-slack-clone/full-schema.sql+++ b/examples/slack-clone/nextjs-slack-clone/full-schema.sql@@ -145,7 +145,7 @@ alter publication supabase_realtime add table public.users;*/-- Create the auth hook function--- https://supabase.com/docs/guides/auth/auth-hooks#hook-custom-access-token+-- https://supabase.com/docs/guides/auth/auth-hooks/custom-access-token-hookcreate or replace function public.custom_access_token_hook(event jsonb)returns jsonblanguage plpgsql@@ -221,4 +221,3 @@ beginreturn user_id;end;$$ language plpgsql;-diff --git a/examples/slack-clone/nextjs-slack-clone/supabase/migrations/20240214114147_auth-hook.sql b/examples/slack-clone/nextjs-slack-clone/supabase/migrations/20240214114147_auth-hook.sqlindex 5b3be2ae946..4ee152b3517 100644--- a/examples/slack-clone/nextjs-slack-clone/supabase/migrations/20240214114147_auth-hook.sql+++ b/examples/slack-clone/nextjs-slack-clone/supabase/migrations/20240214114147_auth-hook.sql@@ -4,7 +4,7 @@*/-- Create the auth hook function--- https://supabase.com/docs/guides/auth/auth-hooks#hook-custom-access-token+-- https://supabase.com/docs/guides/auth/auth-hooks/custom-access-token-hookcreate or replace function public.custom_access_token_hook(event jsonb)returns jsonblanguage plpgsqldiff --git a/packages/shared-data/error-codes.ts b/packages/shared-data/error-codes.tsindex ec683ef5cb8..235a90f1a0a 100644--- a/packages/shared-data/error-codes.ts+++ b/packages/shared-data/error-codes.ts@@ -177,7 +177,7 @@ export const ERROR_CODES: Record<ErrorCodeService, Record<string, ErrorCodeDefin'Further MFA verification is rejected. Only returned if the MFA verification attempt hook returns a reject decision.',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',},],