vault function only works for postgres role

I am trying to call create_secret vault schema function. However it only works for postgres role. Is there any workaround or way i can call the function for authenticated users?
const { data: vaultData, error: vaultError } = await supabase.rpc(
      "create_secret",
      {
        new_secret: "foo",
        new_name: "amit",
      },
    );
Was this page helpful?