© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•14mo ago•
2 replies
Genio

How to keep edge function not publicly accessible ?

I’m setting up an edge function that runs every 8 hours to check my users table and send emails based on a condition. Since the function handles sensitive data, I don’t want anyone to trigger it.

My plan is to generate a SHA256 key, save it in the edge function secrets, and then have the pg_cron job include the SHA256 key and auth anon key in the headers. Then check if the key == one in secrets before running the fucntion

Is this secure, or is there a better way to ensure the function is only triggered by the pg_cron job (aka supabase) every 8 hours?

Thank you
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

How to delete Edge function?
SupabaseSSupabase / help-and-questions
3mo ago
Edge Function not deploying
SupabaseSSupabase / help-and-questions
3y ago
Can't access Vault secrets from Edge Functions without making them publicly accessible
SupabaseSSupabase / help-and-questions
3y ago
Edge Function
SupabaseSSupabase / help-and-questions
5mo ago