Supabase publishable key (#73)

This commit is contained in:
Will Chen
2025-05-02 12:39:17 -07:00
committed by GitHub
parent e488df24a0
commit 4fb4e49c5d

View File

@@ -7,7 +7,10 @@ async function getPublishableKey({ projectId }: { projectId: string }) {
if (!keys) {
throw new Error("No keys found for project");
}
const publishableKey = keys.find((key) => (key as any)["name"] === "anon");
const publishableKey = keys.find(
(key) =>
(key as any)["name"] === "anon" || (key as any)["type"] === "publishable"
);
if (!publishableKey) {
throw new Error("No publishable key found for project");