From 5417c98aa45d5bcd401c58da7adf2ff02303f64f Mon Sep 17 00:00:00 2001 From: DreamInk-Offical Date: Sat, 11 Feb 2023 03:05:21 +0100 Subject: [PATCH] Update auth-policies.mdx --- apps/docs/pages/learn/auth-deep-dive/auth-policies.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/docs/pages/learn/auth-deep-dive/auth-policies.mdx b/apps/docs/pages/learn/auth-deep-dive/auth-policies.mdx index b79c6e038b7..17e81a174b2 100644 --- a/apps/docs/pages/learn/auth-deep-dive/auth-policies.mdx +++ b/apps/docs/pages/learn/auth-deep-dive/auth-policies.mdx @@ -157,7 +157,7 @@ Supabase comes with two built-in helper functions: `auth.uid()` and `auth.jwt()` To create your own functions, navigate to the SQL editor and create a a new query. ``` -create or replace function auth.useragent() returns text as $$ +create or replace function useragent() returns text as $$ select nullif(current_setting('request.headers', true)::json->>'user-agent', '')::text; $$ language sql; ```