The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
fix: using 'authMode' instead of 'authType' (#45626)
Kalleby Santosbcf54b0eaae1
diff --git a/apps/docs/content/guides/functions/auth.mdx b/apps/docs/content/guides/functions/auth.mdxindex 46d137e120c..f6897e83ea6 100644--- a/apps/docs/content/guides/functions/auth.mdx+++ b/apps/docs/content/guides/functions/auth.mdx@@ -249,14 +249,14 @@ export default {### Combining modes-Functions that answer both users and internal callers take an array on `auth`. Modes are tried in order. The first match wins, and `ctx.authType` tells you which matched.+Functions that answer both users and internal callers take an array on `auth`. Modes are tried in order. The first match wins, and `ctx.authMode` tells you which matched.```tsimport { withSupabase } from 'npm:@supabase/server'export default {fetch: withSupabase({ auth: ['user', 'secret:automations'] }, async (req, ctx) => {- if (ctx.authType === 'user') {+ if (ctx.authMode === 'user') {// your business logic for user calls. ctx.supabase is scoped to themreturn Response.json({ ok: true })}