© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•3y ago
Amit Mirgal

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",
      },
    );
const { data: vaultData, error: vaultError } = await supabase.rpc(
      "create_secret",
      {
        new_secret: "foo",
        new_name: "amit",
      },
    );
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Grant Vault Access to New Role
SupabaseSSupabase / help-and-questions
13mo ago
postgres function help
SupabaseSSupabase / help-and-questions
3y ago
Checking role in edge function
SupabaseSSupabase / help-and-questions
4y ago
Vault Help
SupabaseSSupabase / help-and-questions
5mo ago