Edge Functions: Deno, secrets & CORS
Server Actions cover almost everything in DevLog — but not "send a digest every Monday at 9am with no browser tab open," and not "receive a webhook from an email provider that isn't a Next.js route at all." That is what an Edge Function is for: a small, independently-deployed piece of server code, running on Deno instead of Node, that Supabase invokes for you. It looks like a tiny web server. It is actually a second front door into your database — and the two locks on that door are the entire concept.
try to break it
you drive.
Your Server Component calls the function with the caller's own JWT and the publishable key on `apikey`. Nothing privileged has happened yet.
Gate A (verify_jwt) and gate B (auth mode) are independent settings in two different files. The bug that ships is setting one for the browser case and forgetting to flip the other for the cron case — or vice versa.