OptionalauthAuth mode(s) to accept. Modes are tried in order — the first match wins.
A mode falls through only when its credential is absent; a present-but-invalid
JWT short-circuits the chain with InvalidCredentialsError.
OptionalallowUse WithSupabaseConfig.auth instead. The allow option
is kept for backward compatibility and will be removed in a future major release.
When both auth and allow are provided, auth takes precedence.
OptionalenvOverride auto-detected environment variables. Useful for testing or when running in environments without standard env var support.
OptionalcorsCORS configuration for the withSupabase wrapper.
true (default) — uses @supabase/supabase-js default CORS headers.false — disables CORS handling entirely.Record<string, string> — custom CORS headers.Only applies to the top-level withSupabase wrapper. The Hono adapter handles CORS separately via Hono's own middleware.
OptionalsupabaseOptions forwarded to both internal createClient() calls.
accessToken is stripped, and auth settings (persistSession, autoRefreshToken,
detectSessionInUrl) are force-overwritten to server-safe values.
Configuration for withSupabase and createSupabaseContext.
Controls which auth modes are accepted, environment overrides, and CORS behavior.
Example