OpenSource-Hub

supabase

フレームワーク

supabase/supabase

オープンソースの Firebase 代替品で、Postgres データベース、認証、API、リアルタイム機能を提供します。

概要

Supabase は、認証、自動生成された REST および GraphQL API、リアルタイムサブスクリプション、ファイルストレージ、AI/ベクトルツールを統合したホスト型 Postgres 開発プラットフォームです。エンタープライズグレードのオープンソースツールを基盤に構築され、Firebase のような開発者体験を提供します。

README プレビュー

\n\n\n\n\n# Supabase\n\n[Supabase](https://supabase.com) is the Postgres development platform. We're building the features of Firebase using enterprise-grade open source tools.\n\n- [x] Hosted Postgres Database. [Docs](https://supabase.com/docs/guides/database)\n- [x] Authentication and Authorization. [Docs](https://supabase.com/docs/guides/auth)\n- [x] Auto-generated APIs.\n  - [x] REST. [Docs](https://supabase.com/docs/guides/api)\n  - [x] GraphQL. [Docs](https://supabase.com/docs/guides/graphql)\n  - [x] Realtime subscriptions. [Docs](https://supabase.com/docs/guides/realtime)\n- [x] Functions.\n  - [x] Database Functions. [Docs](https://supabase.com/docs/guides/database/functions)\n  - [x] Edge Functions [Docs](https://supabase.com/docs/guides/functions)\n- [x] File Storage. [Docs](https://supabase.com/docs/guides/storage)\n- [x] AI + Vector/Embeddings Toolkit. [Docs](https://supabase.com/docs/guides/ai)\n- [x] Dashboard\n\n\n\nWatch "releases" of this repo to get notified of major updates.\n\n\n\n## Documentation\n\nFor full documentation, visit [supabase.com/docs](https://supabase.com/docs)\n\nTo see how to Contribute, visit [Getting Started](./DEVELOPERS.md)\n\n## Community & Support\n\n- [Community Forum](https://github.com/supabase/supabase/discussions). Best for: help with building, discussion about database best practices.\n- [GitHub Issues](https://github.com/supabase/supabase/issues). Best for: bugs and errors you encounter using Supabase.\n- [Email Support](https://supabase.com/docs/support#business-support). Best for: problems with your database or infrastructure.\n- [Discord](https://discord.supabase.com). Best for: sharing your applications and hanging out with the community.\n\n## How it works\n\nSupabase is a combination of open source tools. We’re building the features of Firebase using enterprise-grade, open source products. If the tools and communities exist, with an MIT, Apache 2, or equivalent open license, we will use and support that tool. 

FAQ (5)

トラブル対応
Supabase Storage のアップロードに、実際のファイル内容ではなく multipart バウンダリが含まれてしまうのはなぜですか?

これは、file_options に大文字の Content-Type ヘッダーを渡した場合に発生します。ストレージバックエンドが multipart ボディの解析に失敗し、エンベロープ全体(--boundary 文字列を含む)をファイルのコンテンツとして保存してしまいますが、それでも 200 OK を返します。

**修正方法:** 代わりに小文字の content-type ヘッダーを使用してください:

# ❌ 壊れている - multipart バウンダリが保存される
supabase.storage.from_("bucket").upload(
    filename, file_content,
    file_options={"Content-Type": file.content_type}
)

# ✅ 正常に動作 - 実際のファイルバイトが保存される
supabase.storage.from_("bucket").upload(
    filename, file_content,
    file_options={"content-type": file.content_type}
)

この問題は、Python クライアント(v2.17.0 で確認済み)と REST API の直接呼び出しの両方に影響します。HTTP ヘッダーは RFC により大文字小文字を区別しないことになっていますが、ストレージバックエンドの multipart パーサーは大文字小文字を区別します。すでに破損したファイルをアップロードしてしまっている場合は、小文字のヘッダーで再アップロードし、ダウンロードが有効なコンテンツを返すことを確認してください。

参照 Issue #37315
トラブル対応
supabase.auth.oauth.approveAuthorization() を呼び出した後、なぜ window.location.href が undefined になるのですか?

supabase.auth.oauth.approveAuthorization() / denyAuthorization() のレスポンスは data.redirect_to ではなく data.redirect_url を返します。古い Supabase ドキュメントの例では誤ったプロパティ名が使用されており、window.location.href = undefined となって /oauth/undefined への無限リダイレクトループが発生していました。修正方法: const { data, error } = await supabase.auth.oauth.approveAuthorization(authorizationId) を使用し、その後 window.location.href = data.redirect_url とします。補足: ブラウザでは SDK がデフォルトで自動リダイレクトを行うため、手動でのリダイレクトが必要なのは skipBrowserRedirect: true を渡す場合のみです。ドキュメントはその後修正されています。

参照 Issue #45006
トラブル対応
Supabaseでメール確認を無効にした後も、'Email Not Confirmed'エラーがまだ発生するのはなぜですか?

「Enable email confirmations」トグル(Authentication > Providers > Email)は、新規のサインアップにのみ適用されます。確認が有効になっている間に登録したユーザーは未確認のまま残り、引き続き「Email Not Confirmed」エラーが発生します。既存のユーザーを修正するには、次のいずれかを行います: 1) SQL Editor で手動で確認する: UPDATE auth.users SET email_confirmed_at = NOW() WHERE email_confirmed_at IS NULL; (または WHERE email = 'user@example.com' で特定のユーザーを対象にする)、または 2) Authentication > Users からテストユーザーを削除して、再度サインアップする。設定を無効にした後の新規サインアップは自動的に確認され、すぐにサインインできます。

参照 Issue #5113
トラブル対応
誤って削除したSupabaseプロジェクトを復元するには?

プロジェクト ref、organization、削除日を添えて、直ちに support@supabase.com の Supabase サポートに連絡し、あなたの具体的なケースを確認してもらってください。なお、Supabase のドキュメントによると、削除されたプロジェクトは通常、完全に削除され、自分で復元することはできないため、復旧は保証されません。今後の予防策として:Project Settings > Database > Backups でデイリーバックアップ(Pro プランで利用可能)を有効にし、定期的にバックアップをダウンロードするか、Project Settings > Database にある connection string を使って pg_dump で独自のダンプを作成してください。

参照 Issue #51595
トラブル対応
Supabaseの請求書を支払う際に、クレジットカードまたはデビットカードが拒否されるのはなぜですか?

Supabaseの請求書を支払う際にカードが拒否された場合は、まず銀行またはカード発行会社に、取引をブロックしていないかどうかを確認してください。銀行からカードに問題がないと確認されても、複数のカードで支払いが失敗し続ける場合、これは請求側の問題であり、お客様側で解決することはできません。組織/プロジェクトの詳細を添えて、support@supabase.com までSupabaseの請求サポートに直接ご連絡ください。チームが支払いの失敗を調査し、請求書の処理を行います。

参照 Issue #51887