---
title: "Discussion on \"Supabase edge function returns 401 \"Invalid JWT\" after switching to the new API keys: the safe fix\" | Hashnode"
description: "Discussion on \"Supabase edge function returns 401 \"Invalid JWT\" after switching to the new API keys: the safe fix\". Edge functions return 401 Invalid JWT after moving to sb_publishable keys? Here's the fix, plus the step that keeps your function from going public."
url: "https://hashnode.com/posts/supabase-edge-function-returns-401-invalid-jwt-after-switching-to-the-new-api-keys-the-safe-fix/6afe68efac45526259c93dcc"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Supabase edge function returns 401 "Invalid JWT" after switching to the new API keys: the safe fix](https://getshipready.hashnode.dev/supabase-edge-function-returns-401-invalid-jwt-after-switching-to-the-new-api-keys-the-safe-fix?utm_source=hashnode&utm_medium=feed)

Edge functions return 401 Invalid JWT after moving to sb\_publishable keys? Here's the fix, plus the step that keeps your function from going public.

1h ago · 4 min read · getshipready.hashnode.dev  
Read the article

-   [#supabase](https://hashnode.com/tag/supabase)
-   [#security](https://hashnode.com/tag/security)
-   [#lovable](https://hashnode.com/tag/lovable)
-   [#webdev](https://hashnode.com/tag/webdev)
-   [#deno](https://hashnode.com/tag/deno)

## Written by

[Ship-Ready](https://hashnode.com/@getshipready)

@getshipready

  
[View profile](https://hashnode.com/@getshipready)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
