Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

fix: authType in functions template should be authMode (#45811)

Tylerbde9d536ba2b
diff --git a/apps/studio/components/interfaces/Functions/Functions.templates.ts b/apps/studio/components/interfaces/Functions/Functions.templates.ts
index bc43a65f487..cbc555527cb 100644
--- a/apps/studio/components/interfaces/Functions/Functions.templates.ts
+++ b/apps/studio/components/interfaces/Functions/Functions.templates.ts
@@ -18,7 +18,7 @@ export default {
const { name }: ReqPayload = await req.json();
// Using 'sb_secret_xyz' bypasses RLS — use for privileged operations
- if (ctx.authType === "secret") {
+ if (ctx.authMode === "secret") {
return Response.json({
message: \`Hello \${name} admin!\`,
});