Vault Help
I have enabled, ran sql queries, exposed the vault schema but i keep getting the same error:
Any ideas?
Here is the code triggering this error:
PS if i run:
I get:
{
code: 'PGRST202',
details: 'Searched for the function public.vault.create_secret with parameters name, secret or with a single unnamed json/jsonb parameter, but no matches were found in the schema cache.',
hint: null,
message: 'Could not find the function public.vault.create_secret(name, secret) in the schema cache'
}{
code: 'PGRST202',
details: 'Searched for the function public.vault.create_secret with parameters name, secret or with a single unnamed json/jsonb parameter, but no matches were found in the schema cache.',
hint: null,
message: 'Could not find the function public.vault.create_secret(name, secret) in the schema cache'
}Any ideas?
Here is the code triggering this error:
const { data: vaultSecret, error: vaultErr } = await supabaseServiceRole.rpc(
"vault.create_secret",
{ name: `id:${userId}`, secret: privatePem }
); const { data: vaultSecret, error: vaultErr } = await supabaseServiceRole.rpc(
"vault.create_secret",
{ name: `id:${userId}`, secret: privatePem }
);PS if i run:
create extension if not exists vault with schema vault;create extension if not exists vault with schema vault;I get:
ERROR: 0A000: extension "vault" is not available
DETAIL: Could not open extension control file "/usr/lib/postgresql/share/postgresql/extension/vault.control": No such file or directory.
HINT: The extension must first be installed on the system where PostgreSQL is running.ERROR: 0A000: extension "vault" is not available
DETAIL: Could not open extension control file "/usr/lib/postgresql/share/postgresql/extension/vault.control": No such file or directory.
HINT: The extension must first be installed on the system where PostgreSQL is running.